locked
Get exact url RRS feed

  • Question

  • User944339287 posted

    hi guys<g class="gr_ gr_12 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation multiReplace" id="12" data-gr-id="12">..</g> my current <g class="gr_ gr_19 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="19" data-gr-id="19">url</g> is http://localhost:54049/web-portal/gallery/update/45512.html#gallery-tab

    I have tried using the following but still cannot see #gallery-tab

    1) Request.Url
    2) HttpContext.Current.Request.RawUrl

    Any idea?

    Tuesday, March 26, 2019 6:44 AM

All replies

  • User-893317190 posted

    Hi kengkit,

    Hash in the url ( in your case is #gallery-tab) will not pass to server, because it is used to guide client side and has nothing to do with server side.

    If you open F12 , you will find the real request url is  http://localhost:54049/web-portal/gallery/update/45512.html  without #gallery-tab.

    If you want to pass data to server , please use query string like ?name=gallery-tab.

    Or you could get gallery-tab in client side using javascript :window.location.hash.

    Best regards,

    Ackerly Xu

    Tuesday, March 26, 2019 8:38 AM
  • User-1841185617 posted

    I also had that problems thanks for the information

    decoraestore

    Friday, March 29, 2019 1:06 PM