Control doesn't respond to Postback

J

Janaka

I have a Custom Control which is used for searching on my site. I've made
it a child of a PlaceHolder, which is contained within the server form tag.
This uses client and server-side validation and both of these work
correctly. The Page_Load event handles fine in my custom control but
whenever I try to do a search the page will postback but the "Search" event
is not fired. I've checked my Button control is wired to the "Search"
event. Is this a problem because the control is contained within a
PlaceHolder?

J
 
J

Janaka

Thanks for the reply. I found out what the problem was though. I was
adding the Control to the PlaceHolder during onPreRender hence it was being
added after the PostBack event handler was called.
 

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,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top