User Controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amy Snyder

    #1

    User Controls

    I am pulling my hair out regarding how the source URL should be for
    images, javascript, etc. when including user controls in my aspx pages.
    I am developing sites on my local machine (XP Pro, IIS 5.0) and can't
    seem to get my user controls to appear correctly. All my images are
    broken and I get javascript errors because it can't find the file. This
    is all due to how I am defining the source (I believe).

    Since my user controls can be used at different levels within my app, I
    define the source as src="/images/image.gif">. The same applies to my
    javascript - src="/js/tabpane.js". What I think is happening is it is
    looking for these files at the root of my wwwroot folder. I am using
    VS.NET 2003 to develop my sites. Can anyone help me out? Is there a
    better way of organizing/setting up my site structure?

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Darsin

    #2
    RE: User Controls

    u shd try root relative path... rather that document
    relative....... .......... or explain more

    "Amy Snyder" wrote:
    [color=blue]
    > I am pulling my hair out regarding how the source URL should be for
    > images, javascript, etc. when including user controls in my aspx pages.
    > I am developing sites on my local machine (XP Pro, IIS 5.0) and can't
    > seem to get my user controls to appear correctly. All my images are
    > broken and I get javascript errors because it can't find the file. This
    > is all due to how I am defining the source (I believe).
    >
    > Since my user controls can be used at different levels within my app, I
    > define the source as src="/images/image.gif">. The same applies to my
    > javascript - src="/js/tabpane.js". What I think is happening is it is
    > looking for these files at the root of my wwwroot folder. I am using
    > VS.NET 2003 to develop my sites. Can anyone help me out? Is there a
    > better way of organizing/setting up my site structure?
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    >[/color]

    Comment

    Working...