Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7642665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:14:52+00:00 2026-05-31T09:14:52+00:00

i have simple radio button list, with static ListItems which i never change. When

  • 0

i have simple radio button list, with static ListItems which i never change. When user selects radio and press submit button, selected index is back to -1. I am not using any UpdatePanels, i havent changed anything with ViewState (i tried both: enabled and disabled), i have tried AutoEventWireup true and false, all values are unique. Nothing helps.

Page code:

<div class="content">
    <div id="registration">
        <asp:Literal runat="server" ID="Literal1" Text="Registration" />
        <asp:Panel runat="server" DefaultButton="UserCreateButton">
            <table class="registration_table">
                <tr><td>
                    <asp:Literal ID="NameLiteral" runat="server" Text='<%$ Resources: Resource, LabelName %>' />
                </td><td>
                    <asp:TextBox runat="server" ID="NameTextBox" autocomplete="off" />
                </td></tr>
                <tr><td>
                    <asp:Literal ID="SurnameLiteral" runat="server" Text='<%$ Resources: Resource, LabelSurame %>' />
                </td><td>
                    <asp:TextBox runat="server" ID="SurnameTextBox" autocomplete="off" />
                </td></tr>
                <tr><td>
                    <asp:Literal ID="UsernameLiteral" runat="server" Text='<%$ Resources: Resource, LabelUsername %>' />
                </td><td>
                    <asp:TextBox runat="server" ID="UsernameTextBox" autocomplete="off" />
                </td></tr>
                <tr><td>
                    <asp:Literal ID="PasswordLiteral" runat="server" Text='<%$ Resources: Resource, LabelPassword %>' />
                </td><td>
                    <asp:TextBox runat="server" ID="PasswordTextBox" TextMode="Password" autocomplete="off" />
                </td></tr>
                <tr><td>
                    <asp:Literal ID="SexLiteral" runat="server" Text='<%$ Resources: Resource, LabelSex %>' />
                </td><td>
                    <asp:RadioButtonList ID="SexList" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal">
                        <asp:ListItem Text="Not chosen" Value="0" Selected="True" />
                        <asp:ListItem Text="Male" Value="1" />
                        <asp:ListItem Text="Female" Value="2" />
                    </asp:RadioButtonList>
                </td></tr>
            </table>
            <asp:Button runat="server" ID="UserCreateButton" Text='<%$ Resources: Resource, LabelRegister %>' OnClick="OnUserCreate" />
        </asp:Panel>
    </div>
</div>

Page codebehind:

public new UserCreatePresenter Presenter
{
    get { return base.Presenter as UserCreatePresenter; }
    set { base.Presenter = value; }
}

protected void Page_Load(object sender, EventArgs e)
{
}

public void OnUserCreate(object sender, EventArgs e)
{
    if (Presenter != null)
    {
        Presenter.OnUserCreate(
            NameTextBox.Text,
            SurnameTextBox.Text,
            UsernameTextBox.Text,
            PasswordTextBox.Text,
            SexList.SelectedValue);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:14:54+00:00Added an answer on May 31, 2026 at 9:14 am

    Kill the OnClick="OnUserCreate"

    set handler in Page_init like
    UserCreateButton.click += new System.EventHandler(OnUserCreate);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.hcfmissoula.com/grants/compassionate-care-grant I have this simple radio button form, and if the user answers yes
I have a simple radio button: new Ext.form.Radio({ id: 'ptype', boxLabel:'Yes', name: 'price_type', value:
I have been trying to get simple YES/NO radio buttons list working but facing
I have a simple form that enables selecting an option (radio button). Upon selection
I trying to make a simple image gallery, where I have several radio button
I would like to have a window with a simple form (radio buttons and
I have simple SSIS package which reads data from flat file and insert into
I have simple SSIS package in which On Error event handler I have created
I have a set of radio buttons where when I click a radio button,
I need to change the bg color of a div containing a radio button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.