R
Ralph Soons
Hi all,
I am trying to save the viewstate in a session instead of storing it in a
hidden of the webpage which is default. This because of performance reasons.
When I use line 2 in combination with line 4, my application works. Using
Line 1 in combination with line 3 (and of course renaming httpSessionState1
to httpSessionState) results in the error as mentioned below.
protected override object LoadPageStateFromPersistenceMedium()
{
1: object httpSessionState1 = this.Session["ViewState"];
2: object httpSessionState = base.LoadPageStateFromPersistenceMedium();
return httpSessionState;
}
protected override void SavePageStateToPersistenceMedium(object viewState)
{
3: this.Session["ViewState"] = viewState;
4: base.SavePageStateToPersistenceMedium(viewState);
}
One other strange thing: there's a difference between httpSessionState1 and
httpSessionState. Comparing the session states in the debugger shows:
- httpSessionState1 {System.Web.UI.Triplet} System.Object
- [System.Web.UI.Triplet] {System.Web.UI.Triplet} System.Web.UI.Triplet
System.Object {System.Web.UI.Triplet} System.Object
+ First "187252947" System.Object
+ Second {System.Web.UI.Triplet} System.Object
- Third {Count=3} System.Object
- [System.Collections.ArrayList] {Count=3} System.Collections.ArrayList
[0] "M2WWebListBarCtrl1:InformationSelectionBars" string
[1] "EDHNavigationTree1:UltraWebTree1" string
[2] "EDHDataPlaceHolder1:_ctl0:UltraChart1" string
- httpSessionState {System.Web.UI.Triplet} System.Object
- [System.Web.UI.Triplet] {System.Web.UI.Triplet} System.Web.UI.Triplet
System.Object {System.Web.UI.Triplet} System.Object
+ First "187252947" System.Object
+ Second {System.Web.UI.Triplet} System.Object
- Third {Count=2} System.Object
- [System.Collections.ArrayList] {Count=2} System.Collections.ArrayList
[0] "M2WWebListBarCtrl1:InformationSelectionBars" string
[1] "EDHNavigationTree1:UltraWebTree1" string
Can anybody help me?! Thanks for your help,
Ralph Soons
The following server error occurs:
Server Error in '/EDHWebView' Application.
----------------------------------------------------------------------------
----
An error has occurred because a control with auto-generated id
'_ctl0roductGraphChart' could not be located to raise a postback event. To
avoid this error, explicitly set the ID property of controls that raise
postback events.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: An error has occurred because a
control with auto-generated id '_ctl0roductGraphChart' could not be
located to raise a postback event. To avoid this error, explicitly set the
ID property of controls that raise postback events.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): An error has occurred because a control with
auto-generated id '_ctl0roductGraphChart' could not be located to raise a
postback event. To avoid this error, explicitly set the ID property of
controls that raise postback events.]
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean
fBeforeLoad)
System.Web.UI.Page.ProcessRequestMain()
I am trying to save the viewstate in a session instead of storing it in a
hidden of the webpage which is default. This because of performance reasons.
When I use line 2 in combination with line 4, my application works. Using
Line 1 in combination with line 3 (and of course renaming httpSessionState1
to httpSessionState) results in the error as mentioned below.
protected override object LoadPageStateFromPersistenceMedium()
{
1: object httpSessionState1 = this.Session["ViewState"];
2: object httpSessionState = base.LoadPageStateFromPersistenceMedium();
return httpSessionState;
}
protected override void SavePageStateToPersistenceMedium(object viewState)
{
3: this.Session["ViewState"] = viewState;
4: base.SavePageStateToPersistenceMedium(viewState);
}
One other strange thing: there's a difference between httpSessionState1 and
httpSessionState. Comparing the session states in the debugger shows:
- httpSessionState1 {System.Web.UI.Triplet} System.Object
- [System.Web.UI.Triplet] {System.Web.UI.Triplet} System.Web.UI.Triplet
System.Object {System.Web.UI.Triplet} System.Object
+ First "187252947" System.Object
+ Second {System.Web.UI.Triplet} System.Object
- Third {Count=3} System.Object
- [System.Collections.ArrayList] {Count=3} System.Collections.ArrayList
[0] "M2WWebListBarCtrl1:InformationSelectionBars" string
[1] "EDHNavigationTree1:UltraWebTree1" string
[2] "EDHDataPlaceHolder1:_ctl0:UltraChart1" string
- httpSessionState {System.Web.UI.Triplet} System.Object
- [System.Web.UI.Triplet] {System.Web.UI.Triplet} System.Web.UI.Triplet
System.Object {System.Web.UI.Triplet} System.Object
+ First "187252947" System.Object
+ Second {System.Web.UI.Triplet} System.Object
- Third {Count=2} System.Object
- [System.Collections.ArrayList] {Count=2} System.Collections.ArrayList
[0] "M2WWebListBarCtrl1:InformationSelectionBars" string
[1] "EDHNavigationTree1:UltraWebTree1" string
Can anybody help me?! Thanks for your help,
Ralph Soons
The following server error occurs:
Server Error in '/EDHWebView' Application.
----------------------------------------------------------------------------
----
An error has occurred because a control with auto-generated id
'_ctl0roductGraphChart' could not be located to raise a postback event. To
avoid this error, explicitly set the ID property of controls that raise
postback events.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Web.HttpException: An error has occurred because a
control with auto-generated id '_ctl0roductGraphChart' could not be
located to raise a postback event. To avoid this error, explicitly set the
ID property of controls that raise postback events.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): An error has occurred because a control with
auto-generated id '_ctl0roductGraphChart' could not be located to raise a
postback event. To avoid this error, explicitly set the ID property of
controls that raise postback events.]
System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean
fBeforeLoad)
System.Web.UI.Page.ProcessRequestMain()