Reputation: 35
Whenever I am passing 2 parameters to an .aspx page with 1st parameter's value containing '#' then I am not able to fetch the value of the second parameter using "Request.Params["param1"]" in aspx.cs code.
Eg: When I hit the following URL (containing '#' in "assignmentname" parameter):
http://localhost/ReportingModule/summaryreport.aspx?assignmentname=School#College&submissionid=86900
then upon executing the code "Request.Params["submissionid"]", I don't get any value.
But when I hit the following URL (deleting the '#'):
http://localhost/ReportingModule/summaryreport.aspx?assignmentname=SchoolCollege&submissionid=86900
It works fine. Whats the problem?
Upvotes: 0
Views: 60
Reputation: 7601
you can use encodeURIComponent
for it like
link = encodeURIComponent(link);
Upvotes: 0