Click here to Skip to main content
15,921,959 members
Home / Discussions / Web Development
   

Web Development

 
QuestionAccessing Files on another server using ASP.NET Pin
bgates19704-Dec-06 8:44
bgates19704-Dec-06 8:44 
QuestionIs there a way to overload a built-in Image constructor to include a src parameter? Pin
howardjr4-Dec-06 7:56
howardjr4-Dec-06 7:56 
QuestionDisplaying RSS Headlines on a Webpage Pin
PhillyT4-Dec-06 3:13
PhillyT4-Dec-06 3:13 
Questionasp.net+http soap+sql server Pin
hhems4-Dec-06 1:19
hhems4-Dec-06 1:19 
AnswerRe: asp.net+http soap+sql server Pin
Bradml4-Dec-06 1:21
Bradml4-Dec-06 1:21 
AnswerRe: asp.net+http soap+sql server Pin
krishna195-Dec-06 1:00
krishna195-Dec-06 1:00 
QuestionHelp Needed!!!! Pin
hiral_shah3-Dec-06 21:26
hiral_shah3-Dec-06 21:26 
AnswerRe: Help Needed!!!! Pin
Guffa4-Dec-06 19:06
Guffa4-Dec-06 19:06 
QuestionNeed Help: How can I access to images in main folder from a website in a subfolder Pin
ullk3-Dec-06 1:26
ullk3-Dec-06 1:26 
AnswerRe: Access to images in main folder or directory Pin
Bradml3-Dec-06 2:04
Bradml3-Dec-06 2:04 
GeneralRe: Access to images in main folder or directory Pin
ullk3-Dec-06 2:28
ullk3-Dec-06 2:28 
GeneralRe: Access to images in main folder or directory Pin
Bradml3-Dec-06 19:47
Bradml3-Dec-06 19:47 
AnswerRe: Need Help: How can I access to images in main folder from a website in a subfolder Pin
Not Active3-Dec-06 16:38
mentorNot Active3-Dec-06 16:38 
AnswerRe: Need Help: How can I access to images in main folder from a website in a subfolder Pin
Dominic Pettifer5-Dec-06 1:41
Dominic Pettifer5-Dec-06 1:41 
The squiggly thing is an asp.net construct for server side web controls that tells the web app to reference the root directory of your application, the client side (eg. web browsers) won't understand what it means.

If you use just /folder/file.gif instead the client browser will know to reference the root instead. However, what that root is depends on how you're developing your application. If you're developing inside a virtual directory, or using Visual Studio built in web server, using slash / will always refer to the root localhost path. Eg. http://localhost:1413/ and NOT http://localhost:1413/YOURAPPNAME/. So if you reference a file as /images/myPic.jpg, it will look in http://localhost:1413/images/myPic.jpg and NOT http://localhost:1413/YOURAPPNAME/images/myPic.jpg. This will work fine once you upload it to your web server to the root address (www.yoursite.com/images/myPic.jpg) but is obviously a problem during development.

You can solve this a number of ways. One is to use server web controls like <asp:Image> tag and reference them as ~/folder which ASP.NET understands and translates automatically for you. Alternatively try using Parent paths such as ../folder, the dot dot tells the browser to go back one directory the look it 'folder'. Finally, try outputting application name dynamic eg. YOURAPPNAME when developing on your server, and nothing (or blank string) for the root for when you deploy it. I think the ASP.NET web control is the best root (pardon the pun).

Dominic Pettifer

Blog: www.dominicpettifer.co.uk

AnswerRe: Need Help: How can I access to images in main folder from a website in a subfolder Pin
ullk5-Dec-06 7:33
ullk5-Dec-06 7:33 
Questionshifting a career! [modified] Pin
catie.cutie2-Dec-06 16:59
catie.cutie2-Dec-06 16:59 
AnswerRe: shifting a career! Pin
Bradml2-Dec-06 17:10
Bradml2-Dec-06 17:10 
AnswerRe: shifting a career! Pin
theJazzyBrain4-Dec-06 1:22
theJazzyBrain4-Dec-06 1:22 
QuestionCustom Web ComboBox Component option seleted even when one wasn't Pin
howardjr2-Dec-06 11:35
howardjr2-Dec-06 11:35 
AnswerRe: Custom Web ComboBox Component option seleted even when one wasn't Pin
howardjr3-Dec-06 3:01
howardjr3-Dec-06 3:01 
GeneralRe: Custom Web ComboBox Component option seleted even when one wasn't Pin
howardjr4-Dec-06 7:58
howardjr4-Dec-06 7:58 
QuestionUpload databse on sql server Pin
Ashish Porwal2-Dec-06 1:42
Ashish Porwal2-Dec-06 1:42 
AnswerRe: Upload databse on sql server Pin
Not Active2-Dec-06 2:53
mentorNot Active2-Dec-06 2:53 
Questiongoogle submenu at search results Pin
tibiz1-Dec-06 19:08
tibiz1-Dec-06 19:08 
QuestionCannot view XML input using XSL style sheet Pin
Arthur Gladney1-Dec-06 19:03
Arthur Gladney1-Dec-06 19:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.