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
Which method is used to perform all validation at the page level?
What’s the use of “GLOBAL.ASAX” file?
What is cookieless session id explain in brief?
Where the viewstate is stored after the page postback?
What is a postback url?
What are the media types of http requests and response?
What are main return types supported in Web API?
14. What are your Future Plans for Swatz Oils GROUP U.K?
How to use multiple scriptmanager controls in a web page?
What is the biggest disadvantage of “Other Return Types” in Web API?
Which is better session or viewstate?
Can we override the enablepartialrendering property of the scriptmanager class?
Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?
Tell me how asp.net mvc differs from asp.net web forms? : asp.net mvc
Is session stored in browser?