Query string :
Pages/Service.aspx?id=4&comment=1
I am new to jquery ,Kindly help me out with a simple solution to get the Id and COMMENT in "var id & var comment" using jQUERY in asp.net C#
Query string :
Pages/Service.aspx?id=4&comment=1
I am new to jquery ,Kindly help me out with a simple solution to get the Id and COMMENT in "var id & var comment" using jQUERY in asp.net C#
Use following code
<script>
function getQuery(key){
var temp = location.search.match(new RegExp(key + "=(.*?)($|\&)", "i"));
if(!temp) return.
return temp[1];
}
var id = getQuery('id');
var comment = getQuery('comment');
</script>