I am trying to send url parameters to an .aspx page. Now I need to get thoose parameters on Page_Load() function.
I am using this code to call the new page. How do I need to add the parameters.
window.location = 'AttendanceExcelReport.aspx';
Then what do I need to do in order to get those parameters on the Page_Load function.
Thanks
You would use Querystrings.
I.E your URL should be formatted as follows:
[URL][?][Key=value]If you are adding multiple parameters then separate with
[&]then your next[key=value]So:
Here is your URL with 2 parameters, ID and Name:
AttendanceExcelReport.aspx?id=1&name=ReportYou can access these by just calling
Request("id")in VB andRequest["id"]in c#Request("name")in VB andRequest["name"]in c#