How to get the particular string from URl?
<p>Hi all i have an URl which looks like this</p>

<pre><code>       http://localhost:60255/Roles/12/Users/
</code></pre>

<p>i need to get this from the href using jquery from window and i should get this string </p>

<pre><code>       http://localhost:60255/Roles/ 
</code></pre>

<p>from the url on click event</p>

<pre><code>    this is what i had been trying

      var windowpathname = window.location.pathname; window.location.href = windowpathname + "Roles/" + RoleID + "/" + RoleName;   
</code></pre>

<p>in this case when i click that second time </p>

<pre><code>       http://localhost:60255/Roles/12/Rahul/Roles/14/Kishore/
</code></pre>
