如何设置单选按钮

时间:2014-10-04 07:39:26

标签: c# asp.net

我正在使用两个单选按钮。问题是现在我可以在" SAVE"之后选择和取消选择单选按钮。按钮单击。但我需要在按钮单击之前选择并取消选择单选按钮。这是我的aspx页面代码。我的显示就像(" O"表示redio按钮)O Fresher O Experienced如果我点击更新,那么体验无线电按钮获取选择。

<%@ Page Title="" Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="ExperienceAdd.aspx.cs" Inherits="Manjilas.WebForm31" %>
<%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" tagPrefix="ajax" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style2 {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="well span5 center login-box">
                <div class="alert alert-info">Add Employee Previous Experience Details</div>
                <form id="form1" runat="server">
                    <fieldset>
                        <asp:UpdatePanel ID="updatepanel1" runat="server">
                            <ContentTemplate>
                                <div>
                                    <ajax:ToolkitScriptManager ID="toolkit1" runat="server"></ajax:ToolkitScriptManager>
                                    <asp:UpdatePanel ID="updatepanel2" runat="server"></asp:UpdatePanel>
                                    <table class="ui-accordion">
                                        <tr>
                                            <td align="left" class="style2"></td>
                                            <td align="left">
                                                <input type="radio" name="type" value="Fresher" />Fresher
                                                <input type="radio" name="type" value="Experienced" />Experienced--%> &nbsp;</td>
                                            </td>
                                            <tr>
                                                <td class="style2">&nbsp;</td>
                                                <td align="left">
                                                    <asp:Button ID="Button1" class="btn-primary" runat="server" Text="Save" Height="36px" Width="74px" />&nbsp;&nbsp;&nbsp;
                                                    <asp:Button ID="Button2" class="btn-primary" runat="server" Text="Cancel" Height="36px" Width="74px" />
                                                </td>
                                            </tr>
                                    </table>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </fieldset>
                </form>
            </div>
            <!--/span-->
        </div>
        <!--/row-->
    </div>
</asp:Content>

0 个答案:

没有答案