You must Sign In to post a response.
  • Category: HTML

    How to get value after .html in url

    I want to implement a page where I want to read value from url which is after .html extension.

    I have a function where admin send email to client with name of the employee referred him like,

    I want to read that "testemployee" text so that, I will call API and get data of employee and display in browser.
    How to achieve this. ?
  • #769834
    its pretty straight forward if you are trying t achieve it using javascript of .net language. There is a in-built methods "SPLIT" that will give you desire output that you are looking for.
    This method will take one parameter based on that you want to split the string (in your case url) and give you the output in form or array.

  • #769839
    As per question, I'm thinking of QueryString concept... you can pass the variable value in querystring!

  • #769851
    Hi Pranjal,

    You can do it through java script using below code:

    var urldata = ""
    urldata = urldata.substr(urldata.lastIndexOf("/") + 1, urldata.length - urldata.lastIndexOf("/"))

    Nirav Lalan
    DNS Gold Member
    "If you can dream it, you can do it."

  • Sign In to post your comments