I am working on an ASP.NET web forms project. I have two main web pages, FirstPage
and SecondPage
, each of which have a .aspx file and a .aspx.cs file. A drop down menu is on top of each page, and the values are taken from an Oracle database. Switching between the two pages is done by clicking on an asp literal. When Firstpage.aspx
is loaded, user selects a value from the drop down list. The corresponding code in the .aspx file looks like this:
<a href="SecondPage.aspx">
<asp:Literal runat="server" id="secondpagetab" EnableViewState="false"/>
</a>
What I need to do is to display that selected value as the default value of the drop down whenever the pages are switched. How do I do this? The value is loaded in the FirstPage.aspx.cs
file. How can I pass it to the SecondPage.aspx
file? Can I pass with the href
tag?