__doPostBack() fails on web form submit() .Net 2.0

G

Guest

In VS 2005 I have a WebForm with 3 UserControls on it. One UserControl
implements the new ICallbackEventHandler to update a DIV based on user input.
The other two implement a <asp:repeater ...> bound to a PagedDataSource.
The repeaters have associated <asp:linkbutton ...> to page forward and back
in the OnClick event. Clicking either link at run-time causes the following
error "Microsoft JScript runtime error: Object doesn't support this property
or method" on the theForm.submit(); line in __doPostBack().

If I remove the UserControl that implements the ICallbackEventHandler the
page works great and pages through the data. I have added an HTML Button
(<input type="button" id="testButton" value="Test Button"
onclick="javascript:document.forms['form1'].submit();">) to bypass the .Net
generated code but still see the error. If I add a submit button I do not
see the error.

I am unable to debug this through the debugger so I'm not sure which object
is causing the error.

What is causing this to fail?
 
G

Guest

Well, I found the problem. Still a little confused why, however. The
UserControl with the ICallbackEventHandler included an HTML <input
type="submit" ...> where the ID was set to "submit". I would normally never
give a submit button the ID of "submit" but must have done so in haste. When
I gave the submit button an ID of "Search" the problem went away.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top