Help with Embedded User Control RESPONSE.WRITE coding

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

    Help with Embedded User Control RESPONSE.WRITE coding

    If I included a UserControl in a form, and them tell it to Response.Write
    some code, will the resulting client script work after the page is rendered.
    Let's say that I instructed the User Control in the form, to Response.Write
    a Window.Open instruction...

    John Cosmas


  • Hermit Dave

    #2
    Re: Help with Embedded User Control RESPONSE.WRITE coding

    once rendered your control will have to initiate a postback in order to
    write. ie on click of something you can cause a postback and then your
    control can write appropriate output. if the page is in a rendered state
    there is not page class and there is no instance of your user control in
    current context of the server.

    hope it came across clearly

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "John Cosmas" <vabo214@msn.co m> wrote in message
    news:#j1oOHtjEH A.2812@tk2msftn gp13.phx.gbl...[color=blue]
    > If I included a UserControl in a form, and them tell it to Response.Write
    > some code, will the resulting client script work after the page is[/color]
    rendered.[color=blue]
    > Let's say that I instructed the User Control in the form, to[/color]
    Response.Write[color=blue]
    > a Window.Open instruction...
    >
    > John Cosmas
    >
    >[/color]


    Comment

    • Curt_C [MVP]

      #3
      Re: Help with Embedded User Control RESPONSE.WRITE coding

      yes but it's not the best way to do it. Perhaps you can give more background
      though so we can point you in the right direction.

      --
      Curt Christianson
      Owner/Lead Developer, DF-Software
      Site: http://www.Darkfalz.com
      Blog: http://blog.Darkfalz.com


      "John Cosmas" <vabo214@msn.co m> wrote in message
      news:%23j1oOHtj EHA.2812@tk2msf tngp13.phx.gbl. ..[color=blue]
      > If I included a UserControl in a form, and them tell it to Response.Write
      > some code, will the resulting client script work after the page is
      > rendered.
      > Let's say that I instructed the User Control in the form, to
      > Response.Write
      > a Window.Open instruction...
      >
      > John Cosmas
      >
      >[/color]


      Comment

      Working...