PDA

View Full Version : Ajax Tabs Content Script - Invalid State Problem



wolfenstein4u
01-02-2008, 07:56 PM
1) Script Title:
Ajax Tabs Content Script - Invalid State Problem

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem:
Im using Ajax Tab script in my ASP.Net application. i have GridView in each tab. In the GridView i have added the bound fields and also in the Grid's RowCommand Event i have assigned grid's row values to the text boxes.

This thing is working perfectly with/without Master pages. now when i include the tabs then the default page is working fine with this and also the external page is called successfully with data loaded in the grid.

But when i click the data for a call to RowCommand Event then it shows the Invalid State Exception. The trace is given below.

--------------------------------------------------------

The state information is invalid for this page and might be corrupted.
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: The state information is invalid for this page and might be corrupted.

Source Error:

[No relevant source lines]


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\trgportal.host\169f6d08\e68c7107\App_Web_avaakvl5.10.cs Line: 0

Stack Trace:

[FormatException: Invalid character in a Base-64 string.]
System.Convert.FromBase64String(String s) +0
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +5
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +142

[ViewStateException: Invalid viewstate.
Client IP: 127.0.0.1
Port:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
ViewState: /wEPDwUKLTM5NjQzNjE5NA8WAh4ETW9kZQUDQWxsFgJmD2QWAgIDD2QWCAIBD2QWAgICDxQrAA0PFgYeC09yaWVudGF0aW9uCyolU3lzdGVtLldlYi5VSS5XZWJDb250cm9scy5PcmllbnRhdGlvbgAeHlN0YXRpY 0VuYWJsZURlZmF1bHRQb3BPdXRJbWFnZWgeC18hRGF0YUJvdW5kZ2QWCh4RSG9yaXpvbnRhbFBhZGRpbmcbAAAAAAAAFEABAAAAHgpGb250X05hbWVzFQEFQXJpYWweCUZvbnRfQm9sZGceCUZvbnRfU2l6ZSgqI lN5c3RlbS5XZWIuVUkuV2ViQ29udHJvbHMuRm9udFVuaXQDOXB0HgRfIVNCAoCcCGQWBh4JQmFja0NvbG9yCo0BHglGb3JlQ29sb3IKjQEfCAIMFgYeC0JvcmRlclN0eWxlCyolU3lzdGVtLldlYi5VSS5XZWJDb 250cm9scy5Cb3JkZXJTdHlsZQUeC0JvcmRlcldpZHRoGwAAAAAAAPA/AQAAAB8IAmAWEB8KCqQBHwsLKwYFHwwbAAAAAAAA8D8BAAAAHwQbAAAAAAAAFEABAAAAHwUVAQVBcmlhbB8GZx8HKCsFAzlwdB8IAuScCGQWBh8JCo0BHwoKjQEfCAIMFggfCwsrBgUfDBsAAAAAAADwPwEAAAAf CQqkAR8IAmhkZGQUKwAFBQ8wOjAsMDoxLDA6MiwwOjMUKwACFhAeBFRleHQFDkRWUiBNYW5hZ2VtZW50HgVWYWx1ZQUORFZSIE1hbmFnZW1lbnQeC05hdmlnYXRlVXJsBRJjYWxsZGlyZWN0b3J5LmFzcHgeB1Rv b2xUaXAFCmxv...]

[HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +119
System.Web.UI.HiddenFieldPageStatePersister.Load() +241
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +80
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8000
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +202
System.Web.UI.Page.ProcessRequest() +85
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +20
System.Web.UI.Page.ProcessRequest(HttpContext context) +110
ASP.Tabs.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\trgportal.host\169f6d08\e68c7107\App_Web_avaakvl5.10.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +390
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65

ddadmin
01-03-2008, 03:14 AM
ASP is alien to me unfortunately, but any error thrown by your ASP page most likely doesn't have anything to do with Ajax Tabs Content script, at least not directly. All the script is doing is fetching the raw contents of the external pages specified by you and adding it to your current page to be shown. Since ASP pages are parsed by the server before being sent out to the client (and to this script), if a ASP error has occurred, it should be due to something on your server, not this script.

wolfenstein4u
01-03-2008, 01:38 PM
That can be the possibility, but when i use IFrames then everything goes well. Only in case of Divs i got this problem. Data is loaded perfectly only the navigation is creating the problem.

Also tell me if i use IFrames, what are the disadvantages of using them? Do i rely on IFrames as i want to use the Tabs in my whole application so if something goes wrong then i have to change so many things. So can you tell me what are the things i need to make sure before using IFrames?

Thanks!

ddadmin
01-03-2008, 11:32 PM
The main disadvantage of using IFRAMEs versus the Ajax option of fetching the tab contents is that the dimensions of the IFRAME is set, and doesn't auto adjust depending on the height of the content. This doesn't pose a navigation problem, however, as vertical scrollbars are added to the IFRAME in the case of longer contents, but it does make the content inclusion appear less seamless than with the Ajax option. However, unlike Ajax, the IFRAME option will display any external page fully rendered, without the possibility of JavaScripts or CSS not being rendered properly (which can occur with Ajax).