datagrid中点击编辑,出现dropdownlist,意思是男女下拉列表,我的意思是想让它与数据库一致,比如数据库中值为1的时候,下拉列表选中女。为0的时候自动选中男,请问如何处理?
解决方案 »
- 用过autocompleteextender这个控件的进来
- 运行regsvr32 script.dll 出错,LoadLibrary("script.dll")失败-找不到制定的模块
- 如何操作指定用户名的Profile?
- ◆◇◆ 在 VS.NET 或是 DW 中如何插入 iframe ??? ◆◇◆
- 求代码, DropDownList 绑定DATAGRID 当按下下拉框在下面弹出一个DATAGRID?谢谢
- 一个查询的问题,谢谢
- 用户注册信息的时候 先查询用户LoginID是否存在 总是在层与层之间调用方法却取不到值
- 急!求助
- 把实体类序列化为JSON格式的字符串。本地测试正常,传到服务器报错。
- Dotnetnuke去哪下载呀
- 如何获取ListBox显示的其中的一行的文本?
- 虽然要代码是可耻!但我真的不会!数据联接响应过程问题.大家帮帮忙
for(int i=0;i<hs.Items.Count;i++)
{
if(hs.Items[i].Value.Trim() == dr[1].ToString().Trim())
{
hs.Items[i].Selected = true;
break;
}
}
hs = null;
}
在模板列中:
<asp:DropDownList id="ddlSex" runat="server" SelectedIndex='<%# DataBinder.Eval(Container.DataItem,"sex") %>'>
<asp:ListItem Value="1">男</asp:ListItem>
<asp:ListItem Value="0">女</asp:ListItem>
</asp:DropDownList>