Using “&” and “+” in Querystring

前端 未结 4 402
礼貌的吻别
礼貌的吻别 2021-01-27 09:18

In call the following URL in Javascript.

var par = \"Participant.aspx?ID=\" + Id + \"&NAME=\" + Name+ \"&FIRSTNAME=\" + Firstname;

Some

4条回答
  •  不思量自难忘°
    2021-01-27 10:22

    hey there is another way:

    before passing it to query string just replace:

    .Replace("&","%26");

    on another page it automatically read %26 as &, but then also it not read as &, just again replace:

    .Replace("%26","&");

提交回复
热议问题