Control doesn't respond to Postback

Discussion in 'ASP .Net Building Controls' started by Janaka, Oct 14, 2003.

  1. Janaka

    Janaka Guest

    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
    Janaka, Oct 14, 2003
    #1
    1. Advertising

  2. Hi Janaka,
    If your control receives postback events you must
    implement IPostBackEventHandler.
    Ref : http://msdn.microsoft.com/library/default.asp?
    url=/library/en-
    us/cpguide/html/cpconcontrolexecutionlifecycle.asp
    Hope that helps
    Have a great day :)
    R Pooran Prasad
    Pooran Prasad, Oct 14, 2003
    #2
    1. Advertising

  3. Janaka

    Janaka Guest

    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.


    "Pooran Prasad" <> wrote in message
    news:00a101c39262$77b27420$...
    > Hi Janaka,
    > If your control receives postback events you must
    > implement IPostBackEventHandler.
    > Ref : http://msdn.microsoft.com/library/default.asp?
    > url=/library/en-
    > us/cpguide/html/cpconcontrolexecutionlifecycle.asp
    > Hope that helps
    > Have a great day :)
    > R Pooran Prasad
    Janaka, Oct 14, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ali
    Replies:
    2
    Views:
    2,631
  2. Sunny via .NET 247
    Replies:
    0
    Views:
    2,475
    Sunny via .NET 247
    Apr 27, 2004
  3. Nickolai Leschov

    news://news.openwatcom.org doesn't respond

    Nickolai Leschov, Sep 18, 2008, in forum: C Programming
    Replies:
    0
    Views:
    295
    Nickolai Leschov
    Sep 18, 2008
  4. Richard
    Replies:
    7
    Views:
    216
    Richard
    Jul 4, 2006
  5. Li Chen
    Replies:
    8
    Views:
    144
    Li Chen
    Oct 14, 2008
Loading...

Share This Page