Groups | Blog | Home
all groups > asp.net building controls > june 2006 >

asp.net building controls : Where is Page.RegisterClientScriptBlock Available?


Mark Rae
6/10/2006 12:00:00 AM
[quoted text, click to view]

Is it available when you type 'Me.'?

Nathan Sokalski
6/10/2006 1:19:43 AM
I have used the RegisterClientScriptBlock method in external functions of
mine (ones that are saved in a separate *.vb file), where I use them as
follows:

Public Shared Sub MyFunction(ByVal txtbox As TextBox)
'other code
txtbox.Page.RegisterClientScriptBlock("mykey","myscript")
'other code
End Sub

When I use this external function in my *.aspx.vb files, it does what I want
and expect. However, when I try to use the RegisterClientScriptBlock in my
*.aspx.vb files, it is not included in the list of methods, properties, etc.
when I type 'Page.' Why is Visual Basic not listing this method with the
others while I am writing my code? The *.aspx.vb file inherits
System.Web.UI.Page just like all the *.aspx.vb files. Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

AddThis Social Bookmark Button