Register clientscript resource

H

Henrik Stidsen

I´m developing a WebControl and need to access the Page object
(Page.ClientScript actually) - how can I do this ?
 
J

Jerry C

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)
 
H

Henrik Stidsen

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... :/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top