Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataGrid Paging Problem in ASCX

1 view
Skip to first unread message

George D

unread,
Apr 26, 2002, 8:14:29 PM4/26/02
to
I've implemented Paging and Sorting in Datagrids many
times without a problem, however I'm stumped on this one.

I have a web user control inside an aspx. My user control
has a datagrid in which I want to implement paging. I do
all the necessary configurations for the datagrid and
wire up the OnPageIndexChanged event, but :

- When there are more rows than the PageSize, the page
opens with a Javascript error. "Expected Identifier". The
error happens on the first line of the following function
(i did View Source to see this):

function __doPostBack(eventTarget, eventArgument) {
var theform = document.default;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}

Same error happens when I click a page number to Page...
by the way, Sorting makes the same error happen, so I
think it has something to do with the Postback obviously.

The aspx is called default.aspx and the user control is
_default.ascx. Is this thing getting confused?
Is "default" a keyword.

The only reason I'm going to default.aspx is that I can't
figure out how to make FormsAuthentication go to a page
other than default.aspx after the call
RedirectFromLoginPage

George D

unread,
Apr 26, 2002, 8:38:11 PM4/26/02
to
The problem does not happen if I change the name of the
aspx to anything other than default.aspx, regardless what
the name of the user control inside the webform is.

This is an ok workaround, but I am using
FormsAuthenticaton to authenticate the site, and when I
call REdirectFromLoginPage, it automatically looks for
default.aspx...

I can force the user to go to websitename/otherpage.aspx
though, but the formsauthentication always looks for
default.aspx regardless of what i configure my start page
to be.

>.
>

Rad

unread,
Apr 27, 2002, 12:55:54 AM4/27/02
to
George,

You don't have to rename the whole page.. just rename the form in the form
tag..

Taake a look at the following article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315990

HTH


"George D" <gdu...@hotmail.com> wrote in message
news:2b5101c1ed83$cede5320$9ae62ecf@tkmsftngxa02...

George D

unread,
Apr 27, 2002, 1:14:41 AM4/27/02
to
Rad,
Thank you! I guess I had never seen this coz I never had
an server controls that did postbacks on a default.aspx
page...
>.
>
0 new messages