A
A Traveler
Hello, i have a control i wrote which inherits from the ImageButton control.
On the ImageButton.ImageUrl property, you can use "~" to represent the root
of your application (vs. the domain root), so if my app resides @
www.myserver.com/myapp/ and i put in an image i can set its imageurl to
"~/images/some.gif". Then when the framework renders it, it renders the SRC
for that image as www.myserver.com/myapp/images/some.gif.
My derived control adds a HotImageUrl (for onmouseover). It works fine, uses
the imagebrowser property designer and everything. Only problem is it doesnt
know how to handle the "~" as a reference to the app's root. In my code for
the control, what is the code i would use to retrieve the applications root
url (ie. www.myserver.com/myapp) and handle the "~" properly?
Thanks in advance,
- Arthur Dent.
On the ImageButton.ImageUrl property, you can use "~" to represent the root
of your application (vs. the domain root), so if my app resides @
www.myserver.com/myapp/ and i put in an image i can set its imageurl to
"~/images/some.gif". Then when the framework renders it, it renders the SRC
for that image as www.myserver.com/myapp/images/some.gif.
My derived control adds a HotImageUrl (for onmouseover). It works fine, uses
the imagebrowser property designer and everything. Only problem is it doesnt
know how to handle the "~" as a reference to the app's root. In my code for
the control, what is the code i would use to retrieve the applications root
url (ie. www.myserver.com/myapp) and handle the "~" properly?
Thanks in advance,
- Arthur Dent.