__doPostBack manual call

G

Guest

I have a child window which does the following after a button is pressed:

Response.Write("<script>window.opener.__doPostBack('','');</script>");

but I get the following uncaught exception upon doing this:

"An error has occurred because a control with auto-generated id '_ctl139'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events. "

I believe this is happening because I have dynamically created and added
controls in that parent window, and they are created each time a postback is
done.

But I'm not passing a sender when calling the javascript __doPostBack, so
why is it looking for that __ctl139 (one of the dynamically created controls?)

I'd appreciate any help you can offer.


Thanks,

drew
 

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

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top