Sandy,
ResolveUrl is very useful when you need to move applications from one server
to another, where the directory structure might be completely different.
If you have a server with a virtual application /Foo :
image1.imageurl =Page.ResolveUr l("~/images/image1.jpg");
will return "/Foo/images/image1.jpg"
If you have a server with a virtual application /Bar :
image1.imageurl =Page.ResolveUr l("~/images/image1.jpg");
will return "/Bar/images/image1.jpg"
Notice that the *same* code resolves different base URLs,
even though the *relative* URLs are identical.
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
=============== =============== =====
"SandyIsCoo l" <sa************ *@gmail.comwrot e in message
news:11******** **************@ 73g2000cwn.goog legroups.com...
Hi
I used the below code for an image button
image1.imageurl ="~/images/image1.jpg";
image1.imageurl =Page.ResolveUr l("~/images/image1.jpg");
Both statements work fine..
I want to see a case where resolveURL method makes a difference.
Thanks,
Sandeep