Register clientscript resource

Discussion in 'ASP .Net Web Controls' started by Henrik Stidsen, Jul 14, 2006.

  1. I´m developing a WebControl and need to access the Page object
    (Page.ClientScript actually) - how can I do this ?
     
    Henrik Stidsen, Jul 14, 2006
    #1
    1. Advertising

  2. Henrik Stidsen

    Jerry C Guest

    Henrick,
    This is the code I am using in a "user web control" that I placed in a web
    zone.


    Dim cstype As Type = Me.GetType()
    Page.ClientScript.RegisterClientScriptBlock(cstype, "ShowCtlMessage",
    "alert('All Search entries are empty. Enter search data. ');", True)
    --
    Jerry


    "Henrik Stidsen" wrote:

    > I´m developing a WebControl and need to access the Page object
    > (Page.ClientScript actually) - how can I do this ?
    >
    >
     
    Jerry C, Jul 14, 2006
    #2
    1. Advertising

  3. Jerry C skrev:

    > Henrick,
    > This is the code I am using in a "user web control" that I placed in a web
    > zone.


    I got it to work - well, some of it...
    Turned out that I could not reference the Page object from the control
    constructor, it works fine from the Init event.

    The problem now is that the WebResource.axd returns no content... :/
     
    Henrik Stidsen, Jul 17, 2006
    #3
    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. =?Utf-8?B?c3Ryb3V0?=

    Handle RadioButtonList click event by Clientscript

    =?Utf-8?B?c3Ryb3V0?=, Oct 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    12,155
    Greg Burns
    Oct 13, 2004
  2. Dirc Khan-Evans
    Replies:
    1
    Views:
    902
    Karl Seguin
    Oct 17, 2005
  3. avishosh
    Replies:
    2
    Views:
    10,579
    avishosh
    Aug 8, 2004
  4. Heinrich Moser
    Replies:
    1
    Views:
    461
    Heinrich Moser
    Mar 27, 2008
  5. Tony
    Replies:
    3
    Views:
    1,184
Loading...

Share This Page