What is view state and how this can be done and was this
there in asp?

Answer Posted / sudeesh i.g.

view state is state management technique used in ASP.net.
Its visibility is inside a current page. It is like session
state difference is that session for entire project all but
view state is visible for entire page. The data in view
state one page can't access from other page. it clear the
data when unload the page. it take more memory, it is not
suitable with gridview, detailsview, listview controls.

eg:

viewstate["id"]=request.querystring["id"];

or

viewstate["id"]=convert.toint32(gridview.datakeys[index][""].string();


like lot of example

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between visual basic and asp.net?

520


Explain about Application and Session Events ?

635


Can I have a unique key as foreign key?

540


In which event of the page life cycle, is the viewstate available?

522


What's the use of formatters in .net?

570






What are the main requirements for caching?

536


What is content page in asp net?

500


What is form method?

495


How will you load dynamic assembly?

537


What is the difference between executescalar and executenonquery?

511


How to send a DataReader as a parameter to a remote client ?

2721


What is the procedure to create the environment for asp.net? : asp.net mvc

514


What is redirecting behavior?

521


Can you explain one critical mapping?

516


What is a web pool?

582