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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • fflush与fsync

    fflush与fsync区别:1、头文件不同fflush包含在头文件中;fsync包含在头文件中;2、参数不同fflush函数原型是:intfflush(FILE*fp);   即,fflush的参数时文件指针。fsync函数原型是:intfsync(intfd);   即,fsync的参数时文件描述符。2、应用层次不同fflush函数应用于用户层,将C语言函数库中的函数提

    2022年5月27日
    102
  • vs2012密钥_ultimate2012产品密钥

    vs2012密钥_ultimate2012产品密钥MicrosoftVisualStudioUltimate2012旗舰版有效注册密钥:YKCW6-BPFPF-BT8C9-7DCTH-QXGWC;KCW6-BPFPF-BT8C9-7DCTH-QXGWC转载于:https://www.cnblogs.com/RogerLu/p/10070312.html

    2022年10月15日
    2
  • 关于ie下阻止ActiveX控件

    关于ie下阻止ActiveX控件
    最近,公司的项目上有个部分要用到ActiveX控件。可是在访问的时候,就会弹出”Internetexplorer已经阻止站点用不安全方式使用ActiveX控件”一句。查了好多资料,除了更改ie的安全设置,没有其他方法。
    更改ie安全设置,需要更改的几个地方:
    首先,Internet选项–>安全
    1.选中Internet –“自定义级别”– “ActiveX控件和插件 “–“对未标记为可安全执行脚本的ActiveX控件初始化并执行脚本”(启用

    2022年5月14日
    46
  • opencv videocapture参数_opencv显示图像

    opencv videocapture参数_opencv显示图像importcv2ascvcapture=cv.VideoCapture(0)whileTrue: ret,frame=capture.read() cv.imshow(“Video”,frame) c=cv.waitKey(1) ifc==27: break capture.release() cv.destroyAllWindows()VideoCapture()中参数是0,表示打开笔记本的内置摄像头cap.read()按帧读取视频,re

    2025年7月16日
    2
  • pip安装scrapy失败_scrapy框架运行

    pip安装scrapy失败_scrapy框架运行错误如图所示,running setup.py install for Twisted…..errorTwisted依赖库安装报错,重新下载手动安装一下下载网址:https://www.lfd.uci.edu/~gohlke/pythonlibs注意:看下安装的python是什么版本,我安装的python 3.9.0,就下载cp39,64位的下载安装的版本不对,就会报:Twisted-20.3.0-cp38-cp38-win_amd64.whl is not a support…

    2022年8月18日
    9
  • SpringBoot——MyBatisPlus分页查询

    SpringBoot——MyBatisPlus分页查询SpringBoot——MyBatisPlus分页查询

    2022年4月23日
    56

发表回复

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

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