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.ResolveUrl("~/images/image1.jpg");
will return "/Foo/images/image1.jpg"
If you have a server with a virtual application /Bar :
image1.imageurl=Page.ResolveUrl("~/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/
===================================
"SandyIsCool" <> wrote in message
news: ups.com...
> Hi
>
> I used the below code for an image button
>
>
> image1.imageurl="~/images/image1.jpg";
> image1.imageurl=Page.ResolveUrl("~/images/image1.jpg");
>
>
> Both statements work fine..
> I want to see a case where resolveURL method makes a difference.
> Thanks,
> Sandeep
>