Checking if other controls exist

Discussion in 'ASP .Net Building Controls' started by Brian Vallelunga, Jul 22, 2003.

  1. 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
     
    Brian Vallelunga, Jul 22, 2003
    #1
    1. Advertising

  2. Brian Vallelunga

    Teemu Keiski Guest

    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" <> wrote in message
    news:%...
    > 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
    >
    >
     
    Teemu Keiski, Jul 23, 2003
    #2
    1. Advertising

  3. Thanks, exactly what I was looking for!

    Brian

    "Teemu Keiski" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:%...
    > > 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
    > >
    > >

    >
    >
     
    Brian Vallelunga, Jul 23, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Y.S.
    Replies:
    3
    Views:
    1,087
    strajan
    Sep 17, 2003
  2. LT
    Replies:
    7
    Views:
    2,151
    Phlip
    Jul 25, 2004
  3. Uzi G.

    Checking if span object(s) exist

    Uzi G., Oct 1, 2003, in forum: Javascript
    Replies:
    5
    Views:
    123
    Lasse Reichstein Nielsen
    Oct 3, 2003
  4. Markus Mohr
    Replies:
    7
    Views:
    276
    Thomas 'PointedEars' Lahn
    Nov 28, 2003
  5. Mel
    Replies:
    0
    Views:
    96
Loading...

Share This Page