Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Checking if other controls exist

Reply
Thread Tools

Checking if other controls exist

 
 
Brian Vallelunga
Guest
Posts: n/a
 
      07-22-2003
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


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      07-23-2003
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



"Brian Vallelunga" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Brian Vallelunga
Guest
Posts: n/a
 
      07-23-2003
Thanks, exactly what I was looking for!

Brian

"Teemu Keiski" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>
>
>
> "Brian Vallelunga" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Does my object exist? So why its HWND doesn't exist? That's a question... (CMonthCalCtrl control) LT C++ 7 07-25-2004 07:08 PM
Can the Favourites Sidebar (IE, Opera, etc.) be addressed selectively (exist or non-exist)? Markus Mohr Javascript 7 11-28-2003 12:20 AM
Checking if span object(s) exist Uzi G. Javascript 5 10-03-2003 01:08 AM
In Schema, how to say "If one element exist, another element must exist"? Y.S. XML 3 09-17-2003 02:51 PM
Help:Why can't I use namespace System.Web? It is said that this namespace doesn't exist. But it should exist. ASP .Net 1 07-29-2003 04:31 PM



Advertisments