Page Load and webcontrol page load

Discussion in 'ASP .Net' started by venky, Jul 6, 2005.

  1. venky

    venky Guest

    Hi,

    I have a question, i have a web control in my web page. Let say i have
    page pag1.aspx and control.ascx and page1 contains control.
    I have written code on the page load of page and also the control but
    page1 page load is never called. Is there any reason or any setting i
    need to do to ?


    venky
    venky, Jul 6, 2005
    #1
    1. Advertising

  2. venky

    Karl Seguin Guest

    Venky:
    something seems odd. No reason why you shouldn't see code from both events
    (the Page_Load one first). Coud you provide some sample code of the
    problem?

    Karl

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
    http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
    come!)


    "venky" <> wrote in message
    news:...
    > Hi,
    >
    > I have a question, i have a web control in my web page. Let say i have
    > page pag1.aspx and control.ascx and page1 contains control.
    > I have written code on the page load of page and also the control but
    > page1 page load is never called. Is there any reason or any setting i
    > need to do to ?
    >
    >
    > venky
    >
    Karl Seguin, Jul 7, 2005
    #2
    1. Advertising

  3. Is your event hook lost?
    Event hook in your InitializeComponent() method commonly.Check that
    method,It should look like:
    private void InitializeComponent(){
    this.Load += new System.EventHandler(this.Page_Load);// lost?
    }
    --
    Help you,Help me.


    "venky" wrote:

    > Hi,
    >
    > I have a question, i have a web control in my web page. Let say i have
    > page pag1.aspx and control.ascx and page1 contains control.
    > I have written code on the page load of page and also the control but
    > page1 page load is never called. Is there any reason or any setting i
    > need to do to ?
    >
    >
    > venky
    >
    >
    =?Utf-8?B?bWFyc2hhbA==?=, Jul 7, 2005
    #3
  4. Hi Venky, following on from Marshals post, in VB the the signature for the
    page load handler would be
    Sub Page_Load(o as object , e as eventargs) handles mybase.load

    HTH jd

    "marshal" wrote:

    > Is your event hook lost?
    > Event hook in your InitializeComponent() method commonly.Check that
    > method,It should look like:
    > private void InitializeComponent(){
    > this.Load += new System.EventHandler(this.Page_Load);// lost?
    > }
    > --
    > Help you,Help me.
    >
    >
    > "venky" wrote:
    >
    > > Hi,
    > >
    > > I have a question, i have a web control in my web page. Let say i have
    > > page pag1.aspx and control.ascx and page1 contains control.
    > > I have written code on the page load of page and also the control but
    > > page1 page load is never called. Is there any reason or any setting i
    > > need to do to ?
    > >
    > >
    > > venky
    > >
    > >
    =?Utf-8?B?bG9uZG9uIGNhbGxpbmc=?=, Jul 7, 2005
    #4
  5. NOpe, it didn't get lost. The event mapping is there but still page load
    function is not called but the webcontrol page load is called.

    venky


    *** Sent via Developersdex http://www.developersdex.com ***
    venkat chellam, Jul 7, 2005
    #5
  6. venky

    venky Guest

    i am seeing the code for events, but event from the aspx page load is
    not called, i mean if i put a break poing in the page, page load and
    also on web control page load, only web control page load is called but
    the page's page load is not called
    venky, Jul 11, 2005
    #6
    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. Guest
    Replies:
    2
    Views:
    725
  2. Luis Ramírez.

    Can a webcontrol (webcontrol.dll) have a configuration file?

    Luis Ramírez., Jul 5, 2004, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    186
    Luis Ramírez
    Jul 6, 2004
  3. Kasabaarde Sumta

    WebControl inside of WebControl and attaching events

    Kasabaarde Sumta, Dec 13, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    177
    Kasabaarde Sumta
    Dec 13, 2004
  4. Fabricio

    Custom webcontrol that references another webcontrol

    Fabricio, Sep 21, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    171
    Fabricio
    Sep 21, 2005
  5. Peter Morris [Air Software Ltd]

    WebControl with non-WebControl property

    Peter Morris [Air Software Ltd], Dec 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    127
    Peter Morris [Air Software Ltd]
    Dec 7, 2004
Loading...

Share This Page