Ask a Question related to ASP.NET General, Design and Development.
-
Christian #1
in LoadViewState() : ViewState is empty after page reloads the 2nd time
Hi,
I have a Webform with 1 submit button and 1 label
code behind :
public class MainWebForm: System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblFName;
protected override void LoadViewState( object o )
{
lblFName.Text = (string)ViewState["FName"];
}
protected override object SaveViewState()
{
ViewState["FName"] = "Enter First Name Here";
return base.SaveViewState();
}
}
Upon loading the page the first time
- LoadViewState() is not executed yet : OK
- SaveViewState() event is executed and saves a value in
the ViewState-object :OK
Page is now displayed with an empty label : OK
Upon pressing the Submit button : page loads a second time
- LoadViewState() is executed and ViewState["FName"] is still empty ????
Why ?
Thanks
Chris
Christian Guest
-
Image changing when page reloads
Hi can someone point me to an extenstion or script, i would like an image to change each time the page is refreshed or reloaded, a easy one if... -
php send var to swf while page reloads
Hi all, I've looked at this doc in the kb: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14253 But the problem is as... -
DataGrid empty on Postback with ViewState enabled
Hi there! I'm having a problem with the datagrid control. I can't seem to get the datagrid to restore it's contents from ViewState. A... -
My flash header reloads every time.
I have a .swf file at the head of my primary page. The page is refreshed each time a user clicks through the menu system (no frames). The flash file... -
in LoadViewState() : ViewState is empty ??
Hi, I have a Webform with 1 submit button and 1 label code behind : public class MainWebForm: System.Web.UI.Page { protected...



Reply With Quote

