I am looking to do exactly what the title states. I have a radio field that i would like to persist across a page refresh. The following is my code:

<div id="RadioFields">
    <input type="radio" name="country" value="usa" id="usa" />USA
    <input type="radio" name="country" value="foreign" id="foreign" />Foreign Country
 <div id="countryerror">
  <div class="asterisk" runat="server">
    <asp:Label ID="lblCountry" runat="server" Visible="false" Text ="Please choose an option." >
3 Years
Discussion Span
Last Post by Taywin

And what are you using? Because by itself HTML is stateless, you reload the page and it will draw itself as specified in the HTML, which in your case, is with neither radio button selected.
You would need either sessions, cookies or some other form of postback


If it is asp.net, you may be looking a functionality that has similar behavior to include in PHP (but not exact) here. In other words, create a generic file to be included in other files.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.