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


相关推荐

  • maven出现导包失败问题

    maven出现导包失败问题

    2020年11月9日
    202
  • vue怎么关闭eslint_如何关闭eslint

    vue怎么关闭eslint_如何关闭eslint@[TOC]VUE关闭eslint严格模式VUE关闭eslint严格模式如果在使用vue@cli搭建vue工程时,不小心选择了eslint严格校验模式,对于开发人员调试代码是很麻烦的事,那么如何关掉eslint严格模式呢?1.在package.json文件下找到eslint配置”eslintConfig”:{“root”:true,”env”:{“node”:true},”extends”:[“plugin:vu

    2022年10月8日
    4
  • 分布式缓存之memcached–命令测试

    1.启动Memcache常用参数2.基本命令五种基本memcached命令执行最简单的操作。这些命令和操作包括:前三个命令是用于操作存储在memcached中的键值对的标准修改命令。

    2021年12月28日
    36
  • 学会使用getopt函数[通俗易懂]

    学会使用getopt函数[通俗易懂]简介getopt函数是命令行参数解析函数,在平时阅读源码的时候经常遇到,很有必要对其总结一下,做个记录!命令行参数各组成部分的名称先来了解下命令行参数各组成部分的名称。直接上图:非常清楚,命令行参数由Commandname,Option,Optionargument以及Operands组成。Commandname不用多说,就是程序的名称。操作对象Operands又…

    2022年6月9日
    49
  • 浅析finalize方法「建议收藏」

    浅析finalize方法「建议收藏」昨天有个小伙伴聊到java对象finalize方法。于是就想好好总结一下。咱们都知道判断一个对象是否已经死了的方法有两种:1:引用计数法2:可达性分析算法由于我们通常使用…

    2026年1月26日
    3
  • BigDecimal转String[通俗易懂]

    @特别鸣谢:BigDecimal转Stringpublicstaticvoidmain(String[]args){//浮点数的打印System.out.println(newBigDecimal(“10000000000”).toString());//普通的数字字符串System.out.pr…

    2022年4月4日
    5.8K

发表回复

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

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