When control init event fired???

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default When control init event fired???

    Put any control on web page.
    create Init event for ths control.
    Write Response.Write("here") inside this event.
    Compile\build\run. I never saw "here" string appear on web page. Why???


    Anatoly Guest

  2. Similar Questions and Discussions

    1. User control init event in C#
      Hi everybody I’m using user controls in a web application, and i’m triyng to make use of its init event. This is the sample code I’m using...
    2. datagrid as Composite control... PageIndexChanged event don't get Fired!! Pls Help
      Hi I am facing a problem... I implemented DataGrid with other Controls as Composite Control. The DataGrid works fine it gets display in my...
    3. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    4. Know in user control page_load if an user control event is going to be fired
      Hi all, i have built a user control that shows a map and let the user zoom in, out, usual stuff. Putting this object in a webform the user can...
    5. Event fired where it shouldn't!
      I am using one main aspx page, in which i am loading different user controls for different web pages. At one place, when i load a user control from...
  3. #2

    Default RE: When control init event fired???

    Anatoly,

    Let me look into this for you and get back to you. If you dynamically
    create the control, it will fire the Init event, but it should fire either
    way I would think.

    Jim Cheshire
    Developer Support
    ASP.NET
    [email]jamesche@online.microsoft.com[/email]

    This post is provided as-is with no warranties and confers no rights.

    --------------------
    >From: "Anatoly" <anatolyr@gilat.com>
    >Subject: When control init event fired???
    >Date: Wed, 30 Jul 2003 11:25:43 +0200
    >Lines: 6
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >Message-ID: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >NNTP-Posting-Host: 212.150.128.10
    >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163266
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    >Put any control on web page.
    >create Init event for ths control.
    >Write Response.Write("here") inside this event.
    >Compile\build\run. I never saw "here" string appear on web page. Why???
    >
    >
    >
    Jim Cheshire Guest

  4. #3

    Default Re: When control init event fired???

    Anatoly,

    I believe the reason for this is that by the time you hook the event, it
    has already fired. That is why if you dynamically create the control, the
    Init event fires without issues. That's what I'm checking on.

    Jim Cheshire
    Developer Support
    ASP.NET
    [email]jamesche@online.microsoft.com[/email]

    This post is provided as-is with no warranties and confers no rights.

    --------------------
    >From: "Anatoly" <anatolyr@gilat.com>
    >References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    <UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    >Subject: Re: When control init event fired???
    >Date: Wed, 30 Jul 2003 18:47:42 +0200
    >Lines: 46
    >X-Priority: 3
    >X-MSMail-Priority: Normal
    >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >Message-ID: <OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >NNTP-Posting-Host: 212.150.128.10
    >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163406
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >
    >Control droped on webpage in design time, still Init event wont fire(I try
    >several controls: textbox, dropdown)
    >Thanks
    >
    >"Jim Cheshire (MS)" <jamesche@online.microsoft.com> wrote in message
    >news:UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl...
    >> Anatoly,
    >>
    >> Let me look into this for you and get back to you. If you dynamically
    >> create the control, it will fire the Init event, but it should fire
    either
    >> way I would think.
    >>
    >> Jim Cheshire
    >> Developer Support
    >> ASP.NET
    >> [email]jamesche@online.microsoft.com[/email]
    >>
    >> This post is provided as-is with no warranties and confers no rights.
    >>
    >> --------------------
    >> >From: "Anatoly" <anatolyr@gilat.com>
    >> >Subject: When control init event fired???
    >> >Date: Wed, 30 Jul 2003 11:25:43 +0200
    >> >Lines: 6
    >> >X-Priority: 3
    >> >X-MSMail-Priority: Normal
    >> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >> >Message-ID: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    >> >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >> >NNTP-Posting-Host: 212.150.128.10
    >> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
    >> >Xref: cpmsftngxa06.phx.gbl
    >microsoft.public.dotnet.framework.aspnet:163266
    >> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >> >
    >> >Put any control on web page.
    >> >create Init event for ths control.
    >> >Write Response.Write("here") inside this event.
    >> >Compile\build\run. I never saw "here" string appear on web page. Why???
    >> >
    >> >
    >> >
    >>
    >
    >
    >
    Jim Cheshire [MSFT] Guest

  5. #4

    Default Re: When control init event fired???

    Anatoly,

    I haven't forgotten you. Still tracking this down for you.

    Jim Cheshire
    Developer Support
    ASP.NET
    [email]jamesche@online.microsoft.com[/email]

    This post is provided as-is with no warranties and confers no rights.

    --------------------
    >X-Tomcat-ID: 485380958
    >References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    <UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    <OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    >MIME-Version: 1.0
    >Content-Type: text/plain
    >Content-Transfer-Encoding: 7bit
    >From: [email]jamesche@online.microsoft.com[/email] (Jim Cheshire [MSFT])
    >Organization: Microsoft
    >Date: Wed, 30 Jul 2003 16:55:50 GMT
    >Subject: Re: When control init event fired???
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >Message-ID: <y$tJwtrVDHA.2000@cpmsftngxa06.phx.gbl>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >Lines: 68
    >Path: cpmsftngxa06.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163439
    >NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
    >
    >Anatoly,
    >
    >I believe the reason for this is that by the time you hook the event, it
    >has already fired. That is why if you dynamically create the control, the
    >Init event fires without issues. That's what I'm checking on.
    >
    >Jim Cheshire
    >Developer Support
    >ASP.NET
    >jamesche@online.microsoft.com
    >
    >This post is provided as-is with no warranties and confers no rights.
    >
    >--------------------
    >>From: "Anatoly" <anatolyr@gilat.com>
    >>References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    ><UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    >>Subject: Re: When control init event fired???
    >>Date: Wed, 30 Jul 2003 18:47:42 +0200
    >>Lines: 46
    >>X-Priority: 3
    >>X-MSMail-Priority: Normal
    >>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >>Message-ID: <OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    >>Newsgroups: microsoft.public.dotnet.framework.aspnet
    >>NNTP-Posting-Host: 212.150.128.10
    >>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
    >>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163406
    >>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>
    >>Control droped on webpage in design time, still Init event wont fire(I try
    >>several controls: textbox, dropdown)
    >>Thanks
    >>
    >>"Jim Cheshire (MS)" <jamesche@online.microsoft.com> wrote in message
    >>news:UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl...
    >>> Anatoly,
    >>>
    >>> Let me look into this for you and get back to you. If you dynamically
    >>> create the control, it will fire the Init event, but it should fire
    >either
    >>> way I would think.
    >>>
    >>> Jim Cheshire
    >>> Developer Support
    >>> ASP.NET
    >>> [email]jamesche@online.microsoft.com[/email]
    >>>
    >>> This post is provided as-is with no warranties and confers no rights.
    >>>
    >>> --------------------
    >>> >From: "Anatoly" <anatolyr@gilat.com>
    >>> >Subject: When control init event fired???
    >>> >Date: Wed, 30 Jul 2003 11:25:43 +0200
    >>> >Lines: 6
    >>> >X-Priority: 3
    >>> >X-MSMail-Priority: Normal
    >>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >>> >Message-ID: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    >>> >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >>> >NNTP-Posting-Host: 212.150.128.10
    >>> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
    >>> >Xref: cpmsftngxa06.phx.gbl
    >>microsoft.public.dotnet.framework.aspnet:16326 6
    >>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>> >
    >>> >Put any control on web page.
    >>> >create Init event for ths control.
    >>> >Write Response.Write("here") inside this event.
    >>> >Compile\build\run. I never saw "here" string appear on web page. Why???
    >>> >
    >>> >
    >>> >
    >>>
    >>
    >>
    >>
    >
    >
    Jim Cheshire [MSFT] Guest

  6. #5

    Default Re: When control init event fired???

    Anatoly,

    The Init event for a control created in Design view is handled in the
    OnInit for the page. If you want to explicitly handle the Init event, you
    need to explicitly create the control by doing it dynamically.

    Jim Cheshire [MSFT]
    Developer Support
    ASP.NET
    [email]jamesche@online.microsoft.com[/email]

    This post is provided as-is with no warranties and confers no rights.

    --------------------
    >X-Tomcat-ID: 629347168
    >References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    <UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    <OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    <y$tJwtrVDHA.2000@cpmsftngxa06.phx.gbl>
    >MIME-Version: 1.0
    >Content-Type: text/plain
    >Content-Transfer-Encoding: 7bit
    >From: [email]jamesche@online.microsoft.com[/email] (Jim Cheshire [MSFT])
    >Organization: Microsoft
    >Date: Fri, 01 Aug 2003 22:19:17 GMT
    >Subject: Re: When control init event fired???
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >Message-ID: <U3mWxrHWDHA.576@cpmsftngxa06.phx.gbl>
    >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >Lines: 96
    >Path: cpmsftngxa06.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:164273
    >NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
    >
    >Anatoly,
    >
    >I haven't forgotten you. Still tracking this down for you.
    >
    >Jim Cheshire
    >Developer Support
    >ASP.NET
    >jamesche@online.microsoft.com
    >
    >This post is provided as-is with no warranties and confers no rights.
    >
    >--------------------
    >>X-Tomcat-ID: 485380958
    >>References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    ><UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    ><OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    >>MIME-Version: 1.0
    >>Content-Type: text/plain
    >>Content-Transfer-Encoding: 7bit
    >>From: [email]jamesche@online.microsoft.com[/email] (Jim Cheshire [MSFT])
    >>Organization: Microsoft
    >>Date: Wed, 30 Jul 2003 16:55:50 GMT
    >>Subject: Re: When control init event fired???
    >>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>Message-ID: <y$tJwtrVDHA.2000@cpmsftngxa06.phx.gbl>
    >>Newsgroups: microsoft.public.dotnet.framework.aspnet
    >>Lines: 68
    >>Path: cpmsftngxa06.phx.gbl
    >>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:163439
    >>NNTP-Posting-Host: TOMCATIMPORT2 10.201.218.182
    >>
    >>Anatoly,
    >>
    >>I believe the reason for this is that by the time you hook the event, it
    >>has already fired. That is why if you dynamically create the control,
    the
    >>Init event fires without issues. That's what I'm checking on.
    >>
    >>Jim Cheshire
    >>Developer Support
    >>ASP.NET
    >>jamesche@online.microsoft.com
    >>
    >>This post is provided as-is with no warranties and confers no rights.
    >>
    >>--------------------
    >>>From: "Anatoly" <anatolyr@gilat.com>
    >>>References: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    >><UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl>
    >>>Subject: Re: When control init event fired???
    >>>Date: Wed, 30 Jul 2003 18:47:42 +0200
    >>>Lines: 46
    >>>X-Priority: 3
    >>>X-MSMail-Priority: Normal
    >>>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >>>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >>>Message-ID: <OsZ7pGrVDHA.2288@TK2MSFTNGP12.phx.gbl>
    >>>Newsgroups: microsoft.public.dotnet.framework.aspnet
    >>>NNTP-Posting-Host: 212.150.128.10
    >>>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
    >>>Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet:163406
    >>>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>>
    >>>Control droped on webpage in design time, still Init event wont fire(I
    try
    >>>several controls: textbox, dropdown)
    >>>Thanks
    >>>
    >>>"Jim Cheshire (MS)" <jamesche@online.microsoft.com> wrote in message
    >>>news:UoFTn7qVDHA.916@cpmsftngxa06.phx.gbl...
    >>>> Anatoly,
    >>>>
    >>>> Let me look into this for you and get back to you. If you dynamically
    >>>> create the control, it will fire the Init event, but it should fire
    >>either
    >>>> way I would think.
    >>>>
    >>>> Jim Cheshire
    >>>> Developer Support
    >>>> ASP.NET
    >>>> [email]jamesche@online.microsoft.com[/email]
    >>>>
    >>>> This post is provided as-is with no warranties and confers no rights.
    >>>>
    >>>> --------------------
    >>>> >From: "Anatoly" <anatolyr@gilat.com>
    >>>> >Subject: When control init event fired???
    >>>> >Date: Wed, 30 Jul 2003 11:25:43 +0200
    >>>> >Lines: 6
    >>>> >X-Priority: 3
    >>>> >X-MSMail-Priority: Normal
    >>>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    >>>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    >>>> >Message-ID: <OTSGrPnVDHA.532@TK2MSFTNGP10.phx.gbl>
    >>>> >Newsgroups: microsoft.public.dotnet.framework.aspnet
    >>>> >NNTP-Posting-Host: 212.150.128.10
    >>>> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
    >>>> >Xref: cpmsftngxa06.phx.gbl
    >>>microsoft.public.dotnet.framework.aspnet:1632 66
    >>>> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    >>>> >
    >>>> >Put any control on web page.
    >>>> >create Init event for ths control.
    >>>> >Write Response.Write("here") inside this event.
    >>>> >Compile\build\run. I never saw "here" string appear on web page.
    Why???
    >>>> >
    >>>> >
    >>>> >
    >>>>
    >>>
    >>>
    >>>
    >>
    >>
    >
    >
    Jim Cheshire [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139