473,386 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

img src="~/"

When use src="~/..." for a img server control will render a relative path to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")
Nov 15 '06 #1
2 1541
"RedHair" <re*****@ms40.url.com.twwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
When use src="~/..." for a img server control will render a relative path
to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")
Request.ServerVariables["APPL_PHYSICAL_PATH"].ToString();

should return the absolute path on the webserver to your app's virtual
root...

There are several other ways of doing the above...
Nov 15 '06 #2
I can assign the path to the control directly?
<asp:Image ImageUrl=".." />
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:Ow**************@TK2MSFTNGP03.phx.gbl...
"RedHair" <re*****@ms40.url.com.twwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>When use src="~/..." for a img server control will render a relative path
to
client, is it possible to return a absolute path?
Otherwise, I need to assgin it with resolveUrl("~/...")

Request.ServerVariables["APPL_PHYSICAL_PATH"].ToString();

should return the absolute path on the webserver to your app's virtual
root...

There are several other ways of doing the above...

Nov 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
12
by: bhennon | last post by:
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to...
24
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two...
6
by: |-|erc | last post by:
Hi, can a .js file read a parameter into it from the HTML file? this is the code to use in peoples HTML files, each member has their own id. <!-- TopCounters Code START --> <script...
9
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript">...
23
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML>...
3
by: Kevin Buchan | last post by:
I have a web page that I want to JIT compile using the 'src' attribute in the Page directive. I've done this many times and life has normally been great, as a result. However, I find myself...
0
by: Henri | last post by:
Hi, I've built a custom control named Tree in MyNameSpace.Tree compiled into dans MyNameSpace.Tree.dll I've then designed a page index.asp with its code in index.aspx.vb (class PageIndex)....
9
by: Burak Gunay | last post by:
Hello, In my asp.net 2.0 page, I have a hyperlink with an arrow image <a id="imgtest" href="#"onclick="return hideColumn()"> <img id="imgArrow" src="App_Themes/Trmis/WebResource3.gif"...
3
by: joe | last post by:
Is it OK to have multiple: <script type="text/javascript" src="funcs1.js"></script> <script type="text/javascript" src="funcs2.js"></script> <script type="text/javascript"...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.