Results 1 to 8 of 8

What is the difference between ResolveUrl and ResolveClientUrl?

This is a discussion on What is the difference between ResolveUrl and ResolveClientUrl? within the Programming forums, part of the Web Designing & Development category; ...

  1. #1
    Senior Member chinmay.sahoo's Avatar
    Join Date
    Dec 2013
    Location
    Banglore
    Posts
    266

    Thumbs up What is the difference between ResolveUrl and ResolveClientUrl?

    ResolveUrl - Returns URL relative to the site root using control’s TemplateSourceDirectory property. ResolveClientUrl – Returns URL relative to the folder containing the source file in which the control is instantiated.

  2. #2
    Senior Member
    Join Date
    Dec 2016
    Posts
    542

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    IF you NEED Facebook or Google Adwords Accounts, I can provide and help you.
    We are the partner of google, we can provide for you account google adwords to run ads, account quality assurance, can spend a lot of money ($50,000 per day).
    If anyone need, can contact to me on SKype: kimngan191294
    I can help you.
    Thanks so much!

  3. #3
    Senior Member charlottegracie's Avatar
    Join Date
    Jan 2017
    Posts
    207

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    ResolveUrl creates the URL relative to the root. ResolveClientUrl creates the URL relative to the current page. You can also use whichever one you want, however ResolveUrl is more commonly used. A fully qualified URL to the specified resource suitable for use on the browser.

  4. #4
    Senior Member
    Join Date
    Nov 2016
    Posts
    152

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    Rightly said..!!

    Quote Originally Posted by charlottegracie View Post
    ResolveUrl creates the URL relative to the root. ResolveClientUrl creates the URL relative to the current page. You can also use whichever one you want, however ResolveUrl is more commonly used. A fully qualified URL to the specified resource suitable for use on the browser.

  5. #5
    Member
    Join Date
    Sep 2017
    Posts
    53

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    Very well described. Thanks For Your Information.

  6. #6
    Senior Member
    Join Date
    Oct 2017
    Posts
    119

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    A fully qualified URL to the specified resource suitable for use on the browser.
    Use the ResolveClientUrl method to return a URL string suitable for use by the client to access resources on the Web server, such as image files, links to additional pages, and so on.


    The converted URL.
    If the relativeUrl parameter contains an absolute URL, the URL is returned unchanged. If the relativeUrl parameter contains a relative URL, that URL is changed to a relative URL that is correct for the current request path, so that the browser can resolve the URL.
    For example, consider the following scenario:
    A client has requested an ASP.NET page that contains a user control that has an image associated with it.

  7. #7
    Junior Member
    Join Date
    Oct 2017
    Posts
    14

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    thanks for the clear explanation
    Quote Originally Posted by charlottegracie View Post
    ResolveUrl creates the URL relative to the root. ResolveClientUrl creates the URL relative to the current page. You can also use whichever one you want, however ResolveUrl is more commonly used. A fully qualified URL to the specified resource suitable for use on the browser.

  8. #8
    Member
    Join Date
    Mar 2018
    Location
    Santa Clara, California, USA
    Posts
    40

    Default Re: What is the difference between ResolveUrl and ResolveClientUrl?

    The .NET Control class methods ResolveUrl and ResolveClientUrl both take a relative URL as a parameter and return relative URLs for client browser use. So what's the difference between them?


    In simple terms, ResolveClientUrl returns a path relative to the current page, and ResolveUrl returns a path relative to the site root. Both methods are particularly useful when passing in a relative URL prefaced with the tilde (~) to indicate the application root.