Can't get postback handler to install for my control.

K

Ken Varn

I have a made a custom control that requires postback. The control relies
on the __dopostback() function to be in place in order for it to do the
postback. I actually call this function directly when I need my control to
do a postback using javascript.

In my PageLoad event for the control, I have called the
Page.RegisterRequiresPostback() function and have implemented the
IPostbackEventHandler and IPostbackDataHandler interfaces in my custom
control class. The control normally works fine and posts back when it needs
to if there are other postback controls on the page. However, if my control
is the only postback control on a page, the __dopostback() function is never
rendered to the page, and my control cannot perform a postback. Is there
some reason why the __dopostback() function is not rendered to the page when
my control is the only postback control on the page? Are there any
suggestions on how I can make this work?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
 
R

recoil

A quick and dirty method would be to add a button and attach an event
handler and then set the button's visibility to hidden.
 
K

Ken Varn

Why doesn't ASP.NET place the __dopostback method on the page if I register
my control as requiring postback?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
 

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,780
Messages
2,569,608
Members
45,250
Latest member
Charlesreero

Latest Threads

Top