__doPostBack with dynamically created controls

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top