Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

c# - How to consume WCF method with "DataSet" return type in Silverlight -


10+ methods in wcf webservice returns object of type dataset

 public system.data.dataset returndata()         {             dataset dataset = new dataset();             //do work on dataset             return dataset;         } 

i want consume wcf webservice in silverlight application.

problem: dataset not resolved system.data.dll not appear in silverlight application's add reference section.

is there workaround or solution?

take on dataset silverlight applications

but advise write classes

edit: show how can use instead of classe, give example

  public class person     {         private int gid;         private string gfirstname="";         private string glastname = "";           public int id         {                          {                 return gid;             }             set             {                 gid = value;             }         }          public string firstname         {                         {                 return gfirstname;             }             set             {                 gfirstname= value;             }         }           public string lastname         {                         {                 return glastname;             }             set             {                 glastname = value;             }         }     } 

.

   public class persons     {         private list<person> glistofperson;          public list<person>         {                         {                 if (glistofperson == null)                 {                     glistofperson= new list<person>();                 }                 return glistofperson;             }             set             {                 glistofperson=value;             }         }      } 

.

public persons returndata() {                              dataset  vds = new dataset();                  //get data sql server or ever in dataset...                  foreach(system.data.datatable t in vds.tables)                 {                     persons  vpersons = new persons();                     foreach(system.data.datarow dr in t.rows)                     {                         person vperson = new person();                         int vtryint;                         int.tryparse(dr["id"].tostring(), out vtryint);                         vperson.id = vtryint;                         vperson.firstname = dr["firstname"].tostring();                         vperson.lastname = dr["lastname"].tostring();                          vpersons.all.add(vperson);                     }                       return vpersons ;  } 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -