JavaScript Src attrubute in ascx

Discussion in 'ASP .Net Building Controls' started by New User, Nov 26, 2003.

  1. New User

    New User Guest

    I have a System.Web.UI.UserControl as custom control and
    I have a javascript block for user control. The problem
    is I want to bring src attribute from outside as property
    or other method.

    e.g <script language="JavaScript"
    src="Scripts/filename.js"></script>

    When I register this control (drop control) on aspx page
    different than current folder in other words, when I have
    aspx page few level down from root asp.net application
    the src attribute does not work. Any ideas.... I am
    really new to asp.net
     
    New User, Nov 26, 2003
    #1
    1. Advertising

  2. Hi,

    I'm not sure I'm following your explanation. You want to add a "Src"
    property to your usercontrol? What do you mean by the 'src' attribute not
    working? Please provide some more details in order to help the guessing
    game.

    --
    Victor Garcia Aprea
    Microsoft MVP | ASP.NET
    Looking for insights on ASP.NET? Read my blog:
    http://obies.com/vga/blog.aspx

    To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
    "New User" <> wrote in message
    news:11e901c3b436$08fb33a0$...
    > I have a System.Web.UI.UserControl as custom control and
    > I have a javascript block for user control. The problem
    > is I want to bring src attribute from outside as property
    > or other method.
    >
    > e.g <script language="JavaScript"
    > src="Scripts/filename.js"></script>
    >
    > When I register this control (drop control) on aspx page
    > different than current folder in other words, when I have
    > aspx page few level down from root asp.net application
    > the src attribute does not work. Any ideas.... I am
    > really new to asp.net
    >
     
    Victor Garcia Aprea [MVP], Nov 26, 2003
    #2
    1. Advertising

  3. New User

    New User Guest

    It is an attribute in JavaScript to include external
    javascript file. It does not work in ASCX control.

    >-----Original Message-----
    >Hi,
    >
    >I'm not sure I'm following your explanation. You want to

    add a "Src"
    >property to your usercontrol? What do you mean by

    the 'src' attribute not
    >working? Please provide some more details in order to

    help the guessing
    >game.
    >
    >--
    >Victor Garcia Aprea
    >Microsoft MVP | ASP.NET
    >Looking for insights on ASP.NET? Read my blog:
    >http://obies.com/vga/blog.aspx
    >
    >To contact me remove 'NOSPAM'. Please post all questions

    to the newsgroup
    >"New User" <> wrote

    in message
    >news:11e901c3b436$08fb33a0$...
    >> I have a System.Web.UI.UserControl as custom control

    and
    >> I have a javascript block for user control. The problem
    >> is I want to bring src attribute from outside as

    property
    >> or other method.
    >>
    >> e.g <script language="JavaScript"
    >> src="Scripts/filename.js"></script>
    >>
    >> When I register this control (drop control) on aspx

    page
    >> different than current folder in other words, when I

    have
    >> aspx page few level down from root asp.net application
    >> the src attribute does not work. Any ideas.... I am
    >> really new to asp.net
    >>

    >
    >
    >.
    >
     
    New User, Dec 1, 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. New User

    Javascript Src Ascx

    New User, Nov 26, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    4,353
    New User
    Dec 1, 2003
  2. alex
    Replies:
    2
    Views:
    464
  3. Steve Richter

    <txt src= ...> equivalent of <img src= ...>

    Steve Richter, Feb 8, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,109
    Laurent Bugnion
    Feb 9, 2006
  4. Greg Johnson
    Replies:
    4
    Views:
    3,090
  5. Replies:
    1
    Views:
    1,629
    Alex Hunsley
    Mar 23, 2007
Loading...

Share This Page