Checking if other controls exist

B

Brian Vallelunga

I'm creating a small control that just outputs an image or text with some
javascript code. What I want is for the control to check if a certain
javascript function has been written on the page it is hosted on already. If
it has, it just outputs its code, otherwise it writes out the common
function first. Multiple versions of this control are to be on the same page
at once. Is this possible?

Thanks,

Brian
 
B

Brian Vallelunga

Thanks, exactly what I was looking for!

Brian

Teemu Keiski said:
I believe methods Page.IsStartupScriptRegistered or
Page.IsClientScriptBlockRegistered will help this one assuming scripts have
been outputted using Page.RegisterStartupScript or
Page.RegisterClientScriptBlock.

--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi

AspInsiders Member, www.aspinsiders.com
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com



already.
 

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,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top