server.transfer

D

DotNetJunkies User

I have a problem with "undefined" form. I use a asp:datagrid and button column. When I click on the link buttons i get a javascript error: "EventTarget not set to an object or null". This is because the __dopostback methode that is automaticly generated by asp:datagrid has the line "var theform = document.<name of form that the datagrid is inside>"

But the "theform" is undefined!

I think this is becaus the url is different from where the form is located. I use server.transfer to transfer control to the aspx page where the form is located, but the url remains the same eventhought the page changes. "theform" is undefined because the url location.href attribute indicaes a different url then where the form is located, so my question is: "How can I make the page find the form, that is in an nother aspx page then what the document object of the current page thinks is where it should get the form?"
 
J

John Saunders

DotNetJunkies User said:
I have a problem with "undefined" form. I use a asp:datagrid and button
column. When I click on the link buttons i get a javascript error:
"EventTarget not set to an object or null". This is because the __dopostback
methode that is automaticly generated by asp:datagrid has the line "var
theform = document. said:
But the "theform" is undefined!

I think this is becaus the url is different from where the form is
located. I use server.transfer to transfer control to the aspx page where
the form is located, but the url remains the same eventhought the page
changes. "theform" is undefined because the url location.href attribute
indicaes a different url then where the form is located, so my question is:
"How can I make the page find the form, that is in an nother aspx page then
what the document object of the current page thinks is where it should get
the form?"

What version of the Framework are you using? There was a bug in 1.1 which
sounds similar to what you're describing. See INFO: Post-RTM .NET Framework
1.1 ASP.NET Hotfix Package Symptoms
(http://support.microsoft.com/?kbid=818803)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top