detecting postback in a server control

Posted on 2007-10-16
Last Modified: 2012-08-13
i've build a custom server control which inherits from webcontrol. inside it i have serveral check boxes which does a autopostback. I have some common functionality that should be triggered on a postback regardless of which control that fired it. so my question is this. how can I detect a postback in the server control in the same way as i would use page.ispostback if i was outside the server control.
Question by:oslonet
    LVL 16

    Expert Comment

    you can still use IsPostback in the Page_Load event of custom control

    Author Comment

    how do i access this inside the custom server control. i tried adding:

    protected void Page_Load(object sender, EventArgs e)


    however this function was never accessed on runtime
    LVL 16

    Accepted Solution

    The event you are searching for is:-
            protected override void OnLoad(EventArgs e)
               //Code here          

    Author Comment

    thank you that worked just perfect :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now