DetailsView使用DropDownList1

DetailsView使用DropDownList1 DetailsView使用DropDownList1类型”>012300112233在插入(DetailsView1_ItemInserting)或更新(DetailsView1_ItemUpdating)事件中加入代码:stringstr=((DropDownList)DetailsView1.Rows[3].Cells[1].FindControl(“DropDownList1”

大家好,又见面了,我是你们的朋友全栈君。  DetailsView使用DropDownList1

<asp:TemplateField HeaderText=”
类型
“>
<EditItemTemplate>
<asp:DropDownList ID=”DropDownList2″ runat=”server”>
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
<InsertItemTemplate>
<asp:DropDownList ID=”DropDownList1″ runat=”server”>
<asp:ListItem>00</asp:ListItem>
<asp:ListItem>11</asp:ListItem>
<asp:ListItem>22</asp:ListItem>
<asp:ListItem>33</asp:ListItem>
</asp:DropDownList>
</InsertItemTemplate>
</asp:TemplateField>
在插入
(DetailsView1_ItemInserting)
或更新
(DetailsView1_ItemUpdating)
事件中加入


代码
:
string str=((DropDownList)DetailsView1.Rows[3].Cells[1].FindControl(“DropDownList1”)).SelectedValue
e.Values.Add(“

你的绑定的名字
“, str);

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/161242.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • ubuntu设置nginx开机启动_ubuntussh

    ubuntu设置nginx开机启动_ubuntussh转载自:https://www.cnblogs.com/xiaoL/p/6964217.htmlnginx-sreload:修改配置后重新加载生效nginx-sreopen:重新打开日志文件nginx-t-c/path/to/nginx.conf测试nginx配置文件是否正确关闭nginx:nginx-sstop:快速停止nginx…

    2022年8月13日
    59
  • HTTP.sys漏洞验证及防护[通俗易懂]

    HTTP.sys漏洞验证及防护[通俗易懂] 使用发包工具构造http请求包检测以fiddler工具为例,构造如下图的请求包:1GEThttp://192.168.174.145/HTTP/1.12Host:192.168.174.1453Range:bytes=0-184467440737095516154Connection:keep-alive5Cache-Control:max-age=06A…

    2022年7月18日
    27
  • 资源网站链接_资源库在线

    资源网站链接_资源库在线1.rpm包下载www.rpmfind.netftp://rpmfind.net/linux2.根据依赖的库文件,查找相应的rpm包https://pkgs.org/3.Cacti相关监控模板https://docs.cacti.net/templates4.percona各版本备份数据工具下载(innobackupex、xtrabackup等)https…

    2022年4月19日
    91
  • 到底什么是hash呢?hash碰撞?为什么HashMap的初始容量是16?

    到底什么是hash呢?hash碰撞?为什么HashMap的初始容量是16?一,到底什么是hash呢?作者:知乎用户链接:https://www.zhihu.com/question/26762707/answer/40119521来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。hash(散列、杂凑)函数,是将任意长度的数据映射到有限长度的域上。直观解释起来,就是对一串数据m进行杂糅,输出另一段固定长度的数据h,作为这段数据的…

    2022年6月16日
    43
  • 金士顿u盘修复工具怎么用_用diskgenius修复u盘

    金士顿u盘修复工具怎么用_用diskgenius修复u盘重新启动电脑后再插入读卡器试试左栏将列出电脑曾连接的所有网络名称对了,量产工具里有个CDROMSIZE,哪个是干嘛的?怎么填?u盘视频怎么在手机上播放不了怎么办到此就启动成功了,adatau盘量产,其实也不难,只是苹果电脑可能对某些启动盘有些挑剔,大家选择合适的准没问题。云顶攻略在WinPE系统的桌面上,鼠标右击我的电脑”—>管理”—>磁盘管理”,可以看到WinPE系笔记本u盘安装…

    2025年10月12日
    1
  • hdu 3336 Count the string 用心写的题解

    hdu 3336 Count the string 用心写的题解ProblemDescriptionItiswellknownthatAekdyCoinisgoodatstringproblemsaswellasnumbertheoryproblems.Whengivenastrings,wecanwritedownallthenon-emptyprefixesofthisstring.Fo

    2022年7月23日
    8

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号