HighTechTalks DotNet Forums  

Re: referenceing ClientScript.RegisterStartupScript in control

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Re: referenceing ClientScript.RegisterStartupScript in control in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Rick Strahl [MVP]
 
Posts: n/a

Default Re: referenceing ClientScript.RegisterStartupScript in control - 12-02-2006 , 05:17 AM







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

+++ Rick ---


"WebBuilder451" <WebBuilder451 (AT) discussions (DOT) microsoft.com> wrote

Quote:
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


Reply With Quote
  #2  
Old   
WebBuilder451
 
Posts: n/a

Default Re: referenceing ClientScript.RegisterStartupScript in control - 12-02-2006 , 10:58 AM






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:

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

+++ Rick ---


"WebBuilder451" <WebBuilder451 (AT) discussions (DOT) microsoft.com> wrote in message
news:20874C50-F101-4C2C-B6D4-2FB435C135AC (AT) microsoft (DOT) 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


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.