110,534
社区成员
发帖
与我相关
我的任务
分享
<asp:DropDownList ID="DropDownList1" runat="server" style="z-index: 1; left: 630px; top: 366px; position: absolute; width: 156px;" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" >
<asp:ListItem Value=>系统管理员</asp:ListItem>
<asp:ListItem Value=>数据维护员</asp:ListItem>
<asp:ListItem Value=>数据分析员</asp:ListItem>
</asp:DropDownList>
protected void Button1_Click(object sender, EventArgs e)
{
string username = TextBox1.Text.ToString().Trim();
string password = TextBox2.Text.ToString().Trim();
string confirm_password = TextBox3.Text.ToString().Trim();
string right = DropDownList1.SelectedValue;
int selectIndex = DropDownList1.SelectedIndex;
<asp:DropDownList ID="DropDownList1" runat="server" style="z-index: 1; left: 630px; top: 366px; position: absolute; width: 156px;" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="True" >
<asp:ListItem Value="1">系统管理员</asp:ListItem>
<asp:ListItem Value="2">数据维护员</asp:ListItem>
<asp:ListItem Value="3">数据分析员</asp:ListItem>
</asp:DropDownList>
string right = DropDownList1.SelectedItem.Text;
int selectIndex = DropDownList1.SelectedIndex;