referenceing ClientScript.RegisterStartupScript in control

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

  1. #1

    Default Re: referenceing ClientScript.RegisterStartupScript in control


    I think you want me.Page.ClientScript.RegisterStartupScript()

    +++ Rick ---


    "WebBuilder451" <WebBuilder451@discussions.microsoft.com> wrote in message
    news:20874C50-F101-4C2C-B6D4-2FB435C135AC@microsoft.com...
    >I can reference thie object in a page directly, but can not get it to work
    > when i create a user control. The message i get is: Reference to a
    > non-shared
    > member requires an object reference. i believe i understand why it will
    > not
    > work, but i'm not sure how to pass the page reference to a control?
    > Public Sub pop(ByVal szUrl As String)
    > ClientScript.RegisterStartupScript _
    > (Me.GetType, "popup", "window.open('" & _
    > "http://www.iknowtek.com" & "','_blank','menubar=no')", True)
    > End Sub
    >
    > *** and VS.net does not that ClientScript
    > thanks
    > KES
    >
    > --
    > thanks (as always)
    > some day i''m gona pay this forum back for all the help i''m getting
    > kes
    Rick Strahl [MVP] Guest

  2. Similar Questions and Discussions

    1. ClientScript.RegisterClientScriptBlock in ASP.NET 2.0
      I am working on converting my code from ASP.NET 1.1 to ASP.NET 2.0. In ASP.NET 1.1 the RegisterClientScriptBlock method was just a key and script...
    2. DHTML and RegisterStartupScript
      I have some DHTML actions which work very well at a page level. However when I take everything and make a control it just falls apart. Everything...
    3. RegisterStartupScript firing at the wrong time
      I have a weird thing going on. I think I've figured out what's causing my problem, but I can't find any way to fix it. I have a custom server...
    4. client side script with RegisterStartupScript issue
      no, you can not control the order the blocks are rendered. you can concat the scripts and register them once. also if you are doing code like: ...
    5. RegisterClientScriptBlock & RegisterStartupScript revisited
      Duh! As is often the case, I found the answer about the comment tags after I hit send. I would sill like to know about the difference in the 2...
  3. #2

    Default Re: referenceing ClientScript.RegisterStartupScript in control

    Rick, you're a fine American! When ever you get to Chicago i got you covered
    for a lunch!
    KES
    --
    thanks (as always)
    some day i''m gona pay this forum back for all the help i''m getting
    kes


    "Rick Strahl [MVP]" wrote:
    >
    > I think you want me.Page.ClientScript.RegisterStartupScript()
    >
    > +++ Rick ---
    >
    >
    > "WebBuilder451" <WebBuilder451@discussions.microsoft.com> wrote in message
    > news:20874C50-F101-4C2C-B6D4-2FB435C135AC@microsoft.com...
    > >I can reference thie object in a page directly, but can not get it to work
    > > when i create a user control. The message i get is: Reference to a
    > > non-shared
    > > member requires an object reference. i believe i understand why it will
    > > not
    > > work, but i'm not sure how to pass the page reference to a control?
    > > Public Sub pop(ByVal szUrl As String)
    > > ClientScript.RegisterStartupScript _
    > > (Me.GetType, "popup", "window.open('" & _
    > > "http://www.iknowtek.com" & "','_blank','menubar=no')", True)
    > > End Sub
    > >
    > > *** and VS.net does not that ClientScript
    > > thanks
    > > KES
    > >
    > > --
    > > thanks (as always)
    > > some day i''m gona pay this forum back for all the help i''m getting
    > > kes
    >
    WebBuilder451 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