Can we access Viewstate in Javascript?

 Posted by vishalneeraj-24503 on 12/19/2013 | Category: JavaScript Interview questions | Views: 5449 | Points: 40
Answer:

Yes,like Session we can also access Viewstate in Javascript.

For Example:-
function access_viewstate()
{
var name = "<%=ViewState["Name"]%>";
alert(name);
}

Where ViewState["Name"] is defined in Code behind page.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response