I have a drop down list called 'Status' on the home page.
<asp:DropDownList ID="Status" Runat="server" OnSelectedIndexChanged="Status_SelectedIndexChanged">
<asp:ListItem value="1">Approved</asp:ListItem>
<asp:ListItem value="2">Withdrawn</asp:ListItem>
<asp:ListItem value="3">Declined</asp:ListItem>
So when the user selects Approved(value=1) from the drop down list and clicks the submit button from the main page, it will display him the list of approved transactions on the next page and also the url will be something like https://sampledemo.com/Approved.aspx?SearchCategory=xxxx&Status=1
Now on the current page(where the approved transactions are displayed) I have a DownloadData button which will actually export the current page data(approved transactions) to an excel file when clicked. Here comes the twist wherein when I click the DownloadData button, it gets redirected to another page with the url of that page be like https://sampledemo.com/downloaddata.aspx?page=xxxx&sub=selectcategory&Status=
It does not get updated with the Status value of the previous page(&Status=1) and due to that, the incorrect data is getting exported to the excel file.
Hence is there a way from Javascript/C#/HTML that we can update the Status value of the DownloadData page such that whenever the user clicks the DownloadData button, url param(&Status) of the Download Data page gets updated with the Status value of the previous page(&Status=1)
For example if the url param value(&Status) of the approved transaction page is 1, then the url param value(&Status) of the Download Data page should also be 1.