When control init event fired???

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anatoly

    #1

    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\r un. I never saw "here" string appear on web page. Why???


  • Jim Cheshire

    #2
    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
    jamesche@online .microsoft.com

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

    --------------------[color=blue]
    >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.53 2@TK2MSFTNGP10. phx.gbl>
    >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
    >NNTP-Posting-Host: 212.150.128.10
    >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
    >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1632 66
    >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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???
    >
    >
    >[/color]

    Comment

    • Jim Cheshire [MSFT]

      #3
      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
      jamesche@online .microsoft.com

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

      --------------------[color=blue]
      >From: "Anatoly" <anatolyr@gilat .com>
      >References: <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
      <UoFTn7qVDHA.91 6@cpmsftngxa06. phx.gbl>[color=blue]
      >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.22 88@TK2MSFTNGP12 .phx.gbl>
      >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
      >NNTP-Posting-Host: 212.150.128.10
      >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
      >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1634 06
      >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
      >
      >Control droped on webpage in design time, still Init event wont fire(I try
      >several controls: textbox, dropdown)
      >Thanks
      >
      >"Jim Cheshire (MS)" <jamesche@onlin e.microsoft.com > wrote in message
      >news:UoFTn7qVD HA.916@cpmsftng xa06.phx.gbl...[color=green]
      >> 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[/color][/color]
      either[color=blue][color=green]
      >> way I would think.
      >>
      >> Jim Cheshire
      >> Developer Support
      >> ASP.NET
      >> jamesche@online .microsoft.com
      >>
      >> This post is provided as-is with no warranties and confers no rights.
      >>
      >> --------------------[color=darkred]
      >> >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.53 2@TK2MSFTNGP10. phx.gbl>
      >> >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
      >> >NNTP-Posting-Host: 212.150.128.10
      >> >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
      >> >Xref: cpmsftngxa06.ph x.gbl[/color][/color]
      >microsoft.publ ic.dotnet.frame work.aspnet:163 266[color=green][color=darkred]
      >> >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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???
      >> >
      >> >
      >> >[/color]
      >>[/color]
      >
      >
      >[/color]

      Comment

      • Jim Cheshire [MSFT]

        #4
        Re: When control init event fired???

        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.

        --------------------[color=blue]
        >X-Tomcat-ID: 485380958
        >References: <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
        <UoFTn7qVDHA.91 6@cpmsftngxa06. phx.gbl>
        <OsZ7pGrVDHA.22 88@TK2MSFTNGP12 .phx.gbl>[color=blue]
        >MIME-Version: 1.0
        >Content-Type: text/plain
        >Content-Transfer-Encoding: 7bit
        >From: jamesche@online .microsoft.com (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.publi c.dotnet.framew ork.aspnet
        >Message-ID: <y$tJwtrVDHA.20 00@cpmsftngxa06 .phx.gbl>
        >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        >Lines: 68
        >Path: cpmsftngxa06.ph x.gbl
        >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1634 39
        >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@onlin e.microsoft.com
        >
        >This post is provided as-is with no warranties and confers no rights.
        >
        >--------------------[color=green]
        >>From: "Anatoly" <anatolyr@gilat .com>
        >>References: <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
        ><UoFTn7qVDHA.9 16@cpmsftngxa06 .phx.gbl>[color=green]
        >>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.22 88@TK2MSFTNGP12 .phx.gbl>
        >>Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        >>NNTP-Posting-Host: 212.150.128.10
        >>Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
        >>Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1634 06
        >>X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
        >>
        >>Control droped on webpage in design time, still Init event wont fire(I try
        >>several controls: textbox, dropdown)
        >>Thanks
        >>
        >>"Jim Cheshire (MS)" <jamesche@onlin e.microsoft.com > wrote in message
        >>news:UoFTn7qV DHA.916@cpmsftn gxa06.phx.gbl.. .[color=darkred]
        >>> 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[/color][/color]
        >either[color=green][color=darkred]
        >>> way I would think.
        >>>
        >>> 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>
        >>> >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.53 2@TK2MSFTNGP10. phx.gbl>
        >>> >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
        >>> >NNTP-Posting-Host: 212.150.128.10
        >>> >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
        >>> >Xref: cpmsftngxa06.ph x.gbl[/color]
        >>microsoft.pub lic.dotnet.fram ework.aspnet:16 3266[color=darkred]
        >>> >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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???
        >>> >
        >>> >
        >>> >
        >>>[/color]
        >>
        >>
        >>[/color]
        >
        >[/color]

        Comment

        • Jim Cheshire [MSFT]

          #5
          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
          jamesche@online .microsoft.com

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

          --------------------[color=blue]
          >X-Tomcat-ID: 629347168
          >References: <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
          <UoFTn7qVDHA.91 6@cpmsftngxa06. phx.gbl>
          <OsZ7pGrVDHA.22 88@TK2MSFTNGP12 .phx.gbl>
          <y$tJwtrVDHA.20 00@cpmsftngxa06 .phx.gbl>[color=blue]
          >MIME-Version: 1.0
          >Content-Type: text/plain
          >Content-Transfer-Encoding: 7bit
          >From: jamesche@online .microsoft.com (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.publi c.dotnet.framew ork.aspnet
          >Message-ID: <U3mWxrHWDHA.57 6@cpmsftngxa06. phx.gbl>
          >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
          >Lines: 96
          >Path: cpmsftngxa06.ph x.gbl
          >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1642 73
          >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@onlin e.microsoft.com
          >
          >This post is provided as-is with no warranties and confers no rights.
          >
          >--------------------[color=green]
          >>X-Tomcat-ID: 485380958
          >>References: <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
          ><UoFTn7qVDHA.9 16@cpmsftngxa06 .phx.gbl>
          ><OsZ7pGrVDHA.2 288@TK2MSFTNGP1 2.phx.gbl>[color=green]
          >>MIME-Version: 1.0
          >>Content-Type: text/plain
          >>Content-Transfer-Encoding: 7bit
          >>From: jamesche@online .microsoft.com (Jim Cheshire [MSFT])
          >>Organizatio n: Microsoft
          >>Date: Wed, 30 Jul 2003 16:55:50 GMT
          >>Subject: Re: When control init event fired???
          >>X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
          >>Message-ID: <y$tJwtrVDHA.20 00@cpmsftngxa06 .phx.gbl>
          >>Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
          >>Lines: 68
          >>Path: cpmsftngxa06.ph x.gbl
          >>Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1634 39
          >>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,[/color][/color]
          the[color=blue][color=green]
          >>Init event fires without issues. That's what I'm checking on.
          >>
          >>Jim Cheshire
          >>Developer Support
          >>ASP.NET
          >>jamesche@onli ne.microsoft.co m
          >>
          >>This post is provided as-is with no warranties and confers no rights.
          >>
          >>--------------------[color=darkred]
          >>>From: "Anatoly" <anatolyr@gilat .com>
          >>>References : <OTSGrPnVDHA.53 2@TK2MSFTNGP10. phx.gbl>[/color]
          >><UoFTn7qVDHA. 916@cpmsftngxa0 6.phx.gbl>[color=darkred]
          >>>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.22 88@TK2MSFTNGP12 .phx.gbl>
          >>>Newsgroups : microsoft.publi c.dotnet.framew ork.aspnet
          >>>NNTP-Posting-Host: 212.150.128.10
          >>>Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP12.phx.g bl
          >>>Xref: cpmsftngxa06.ph x.gbl[/color][/color][/color]
          microsoft.publi c.dotnet.framew ork.aspnet:1634 06[color=blue][color=green][color=darkred]
          >>>X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
          >>>
          >>>Control droped on webpage in design time, still Init event wont fire(I[/color][/color][/color]
          try[color=blue][color=green][color=darkred]
          >>>several controls: textbox, dropdown)
          >>>Thanks
          >>>
          >>>"Jim Cheshire (MS)" <jamesche@onlin e.microsoft.com > wrote in message
          >>>news:UoFTn7q VDHA.916@cpmsft ngxa06.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[/color]
          >>either[color=darkred]
          >>>> way I would think.
          >>>>
          >>>> 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>
          >>>> >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.53 2@TK2MSFTNGP10. phx.gbl>
          >>>> >Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
          >>>> >NNTP-Posting-Host: 212.150.128.10
          >>>> >Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP10.phx.g bl
          >>>> >Xref: cpmsftngxa06.ph x.gbl
          >>>microsoft.pu blic.dotnet.fra mework.aspnet:1 63266
          >>>> >X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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.[/color][/color][/color]
          Why???[color=blue][color=green][color=darkred]
          >>>> >
          >>>> >
          >>>> >
          >>>>
          >>>
          >>>
          >>>[/color]
          >>
          >>[/color]
          >
          >[/color]

          Comment

          Working...