Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to specify full path,not just relative to a web page?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have to short questions
When I want to specify path in ImageURL attribute,
it only works if I use relative URL(relative to the location of the web page).
But I can't specify full path,that is absolute URL.

//it doesn't work
ImageURL="localhost/what/X.jpg"

If I have TextBox control and AutoPostBack="TRUE",does
a page get posted back only if I changed some text in a box?Why not everytime?
Lets say I write a word 'HEY'in a box.This time page will be posted back.But why won't it be posted back the second time if I won't change any text?The reason I notice this is because I used AdRotator control which displays different images whenever page is posted back!

Thank you for taking the time
 
ImageURL="localhost/what/X.jpg"

is a relative URL

ImageURL="
is absolute, which I think is what you're after... you must qualify the address with the protocol.

I don't really understand your second question.
penny1.gif
penny1.gif
 
Thank you very much for your help,but can I steal you some more time?
If I write something in textbox,than the minute I press enter the page is posted back(if AutoPostBack="true").So should happend everytime if I write something in a box and than press enter.
But lets say I write 'HEY' in a textbox and than press ENTER.Page gets posted to server.Than I click inside the box
to write something else,but I change my mind and leave the word 'HEY' unchanged.When I press Enter,page should be posted back to server,but it doesnt.
I notice this because I used AdRotator control which displayed different image everytime page was posted back.But this didn't happend if text was unchanged(I still clicked inside the textbox with my mouse so that when I pressed Enter page would be posted back ).

I hope I didn't drown anyone with my novel
 
When you click the button or press the enter key, the page will search for changes. If you have retyped the old word back in... then the page sees no change and therefore doesn't trigger a useless postback. In fact it would reload itself as it is.
Now, if you are trying to do something else and you need to force a postback then that is different. It all depends on what you really need to do.

hth
 
Thank you very much.I don't mean to be annoying,but this reload word.I have a very loose understanding of this word,it could mean many things,what exactly is does it mean?I also didn't know page could reload itself,I thought those kind of things would fall on servers back?

Even if youd don't answer,thank you again
 
Incase you are interested;

Whilst 'what/X.jpg' is a relative url, '/what/X.jpg' is absolute, the leading slash meaning to take it from the server root.

This is effectivly the same as if you are referring to your own server. Which makes the code more portable IMO.
[smurf]
01101000011000010110010001110011
 
Thanks,but could you please answer my second question?
That would be realy COOL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top