Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can you store dataset in viewstate?

Answer Posted / venkat

//create datatable
datatable dt = new datatable();
//Create new dataset :

DataSet ds = new DataSet();
ds.table.add(dt);
//Store the dataset directly into view state
ViewState["dsn"]=ds.table[0];
//retrieve the dataset where it required
DataSet ds = (DataSet)ViewState["dsn"];
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can one dll file contains the compiled code of more than one .net language?

954


Difference between overriding and overloading?

1177


What is http protocol and how it works?

968


Describe paging in asp.net?

1098


What New Features comes with ASP.NET Web API 2.0?

968


Explain the difference between asp & asp.net.

965


What does mvc represent in asp.net? : asp.net mvc

1098


In early binding will the method invoked on com component will verify it?s existance in the system or not ?

2580


We are using Jscriopt validations and at clint site javascript is not running that time validation would work? if yes then how it would behave?

1848


Describe how ASP.NET maintains process isolation for each Web application?

1022


What kind of programming language is ASP.NET?

1083


Why is this service branded with windows livetm?

1025


What is query string? What are its advantages and limitations?

924


How does a content page differ from a master page?

994


Describe the difference between inline and code behind - which is best in?

999