Search:
Namespaces
Discussions
.NET v1.1
Feedback
Error on Datagrid Paging Postback...
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngibuyspy' list
.
Phil Orion
I have a basic database module. Nothing sophisticated. This module contains
a datagrid.
All I want to do is implement paging on the datagrid. When I change the
AllowPaging Property to "True" then render the module, I get the page
number links
just fine. when I click on the page number link
I receive the error message...
Server Error in '/dotnetportal' Application.
----------------------------------------------------------------------------
----
The View State 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 View State is invalid for
this page and might be corrupted.
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): The View State is invalid for this page and
might be corrupted.]
System.Web.UI.
Page
.LoadPageStateFromPersistenceMedium() +149
System.Web.UI.
Page
.LoadPageViewState() +16
System.Web.UI.
Page
.ProcessRequestMain() +421
----------------------------------------------------------------------------
----
Version Information: Microsoft .NET Framework Version:1.0.3705.209; ASP.NET
Version:1.0.3705.0
Reply to this message...
Dave VanderWekke
There is a bit more involved that just turning the paging on. You need
to set how many item per page to show. You also need to add the
following code to capture the click of the page numbers.
Private Sub myDataGrid_PageIndexChanged(ByVal source As Object,
ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs)
Handles myDataGrid.PageIndexChanged
myDataGrid.CurrentPageIndex = e.NewPageIndex
myDataGrid.DataBind()
End Sub
-----Original Message-----
From: Phil Orion [mailto:
Click here to reveal e-mail address
]
Sent: Saturday, July 13, 2002 6:26 PM
To: aspngibuyspy
Subject: [aspngibuyspy] Error on Datagrid Paging Postback...
I have a basic database module. Nothing sophisticated. This module
contains a datagrid. All I want to do is implement paging on the
datagrid. When I change the AllowPaging Property to "True" then render
the module, I get the page number links just fine. when I click on the
page number link I receive the error message...
Server Error in '/dotnetportal' Application.
------------------------------------------------------------------------
----
----
The View State 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 View State is invalid
for this page and might be corrupted.
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): The View State is invalid for this page and
might be corrupted.]
System.Web.UI.
Page
.LoadPageStateFromPersistenceMedium() +149
System.Web.UI.
Page
.LoadPageViewState() +16
System.Web.UI.
Page
.ProcessRequestMain() +421
------------------------------------------------------------------------
----
----
Version Information: Microsoft .NET Framework Version:1.0.3705.209;
ASP.NET Version:1.0.3705.0
| [aspngibuyspy] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngibuyspy.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Phil Orion
Good Catch Dave,
Sorry for leaving out some of the details.
1) I have the code structured exactly as you noted.
2) I researched this anomaly some more and I think I know the pattern.
3) When the control is placed on a page all by itself, it works fine. When it is on a page with other controls it fails.
4) The basic problem seems to be the ole "only one form tag with runat="server"" allowed on a page along with
event bubbling.
What this begs is another question... Within the IBS framework, I want to have:
- two modules
- each has a datagrid
-each datagrid has paging
Can this be done?
Phil
"Dave VanderWekke" <
Click here to reveal e-mail address
> wrote in message news:684278@aspngibuyspy...
[Original message clipped]
Reply to this message...
Duncan C. Ion
Phil,
I had this problem yesterday. Andre Colbiornsen kindly provided me with
the solution.
Remove the <Form Runat=Server> tag(s) from the User control(s).
Place the tag into the parent aspx file at the appropriate position. Eg
if you have the user control(s) inside a table, put the Form tag there.
The problem does highlight an architectural issue which suggests that
webform based user controls aren't as empirical as they should be.
with regards,
Duncan
All outgoing email is scanned using the Norton Antivirus system.
This email is private and may contain confidential matter. If you are
not the designated recipient, please return this email to
<mailto:
Click here to reveal e-mail address
>
Click here to reveal e-mail address
Thank you.
-----Original Message-----
From: Phil Orion [mailto:
Click here to reveal e-mail address
]
Sent: 17 July 2002 16:01
To: aspngibuyspy
Subject: [aspngibuyspy] Re: Error on Datagrid Paging Postback...
Good Catch Dave,
Sorry for leaving out some of the details.
1) I have the code structured exactly as you noted.
2) I researched this anomaly some more and I think I know the pattern.
3) When the control is placed on a page all by itself, it works fine.
When it is on a page with other controls it fails.
4) The basic problem seems to be the ole "only one form tag with
runat="server"" allowed on a page along with
event bubbling.
What this begs is another question... Within the IBS framework, I want
to have:
- two modules
- each has a datagrid
-each datagrid has paging
Can this be done?
Phil
"Dave VanderWekke" < <mailto:
Click here to reveal e-mail address
>
Click here to reveal e-mail address
>
wrote in message <news:684278@aspngibuyspy> news:684278@aspngibuyspy...
[Original message clipped]
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Phil Orion
Duncan,
If you place the following in an HTML Module
<table width="100%" CELLSPACING=0 BORDER=0>
<tr><td bgcolor="#ffffcc">
<form name="dict_form" action="
http://www.dictionary.com/cgi-bin/dict.pl"
;>
<font color="#993300" face="Myriad,Arial,Helvetica,sans-serif"><strong> Look up:</strong></font><br>
<input type="text" name="term" size=28 maxlength=48 value=""><br>
<input type="image" src="./images/OK.gif" alt="OK" border=0>
</form>
</td></tr>
</table>
It will not redirect to dictionary.com for some reason. It appears that whether there is a runat=server or not
it fails.
Thoughts?
Phil
"Duncan C. Ion" <
Click here to reveal e-mail address
> wrote in message news:685742@aspngibuyspy...
Phil,
I had this problem yesterday. Andre Colbiornsen kindly provided me with the solution.
Remove the <Form Runat=Server> tag(s) from the User control(s).
Place the tag into the parent aspx file at the appropriate position. Eg if you have the user control(s) inside a table, put the Form tag there.
The problem does highlight an architectural issue which suggests that webform based user controls aren't as empirical as they should be.
with regards,
Duncan
All outgoing email is scanned using the Norton Antivirus system.
This email is private and may contain confidential matter. If you are not the designated recipient, please return this email to
Click here to reveal e-mail address
Thank you.
-----Original Message-----
From: Phil Orion [mailto:
Click here to reveal e-mail address
]
Sent: 17 July 2002 16:01
To: aspngibuyspy
Subject: [aspngibuyspy] Re: Error on Datagrid Paging Postback...
Good Catch Dave,
Sorry for leaving out some of the details.
1) I have the code structured exactly as you noted.
2) I researched this anomaly some more and I think I know the pattern.
3) When the control is placed on a page all by itself, it works fine. When it is on a page with other controls it fails.
4) The basic problem seems to be the ole "only one form tag with runat="server"" allowed on a page along with
event bubbling.
What this begs is another question... Within the IBS framework, I want to have:
- two modules
- each has a datagrid
-each datagrid has paging
Can this be done?
Phil
"Dave VanderWekke" <
Click here to reveal e-mail address
> wrote in message news:684278@aspngibuyspy...
[Original message clipped]
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
System.Web.HttpException
System.Web.UI.Page
System.Web.UI.WebControls.DataGridPageChangedEventArgs
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com