Gopal Biswas Gopal Biswas - 7 months ago 30
ASP.NET (C#) Question

How to set querystring value using javascript function in ASP.Net?

I have a menu in page like below:

<ul class="dropdown-menu">
<a href="employerlist.aspx?id=;javascript:getQueryStringValue('id');">Add Employer</a>

I want to redirect pages to different urls along with a value which returned from the javascript function "getQueryStringValue". Now the problem is I cannot concatenate the url with the javascript function in "href".
Any help will be appreciated.


Like this:

<a href="" onclick="location.href='employerlist.aspx?id=' + getQueryStringValue('id');return false;">Add Employer</a>