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


相关推荐

  • Oracle修改表名报错ORA-14047

    Oracle修改表名报错ORA-140471、使用sys或其他用户修改表名SQL>showuser;USERis”SYS”SQL>altertableuser1.tb1renametouser1.tb2;ERRORatline1:ORA-14047:ALTERTABLE|INDEXRENAMEmaynotbecombinedwithotheroperations#使用非属主用户修改表名时修改后的表名不需要加属主正确修改方式:SQL>altertableuser

    2022年5月17日
    47
  • cortex m3堆栈_arm m0 内核

    cortex m3堆栈_arm m0 内核CortexM3Bit-banding简介分类: ARM MCU2012-06-1914:30 1369人阅读 评论(0) 收藏 举报存储byte语言iocbit-band是Cortex-M3内核中针对某一段区域进行位和字映射的机制,对于位操作,如IO控制LED,相比传递的C语言的位操作,提供了很大的方便.bit-band区域将存储器别名区(bit-ba

    2022年10月13日
    5
  • golang面试题(带答案)[通俗易懂]

    golang面试题(带答案)[通俗易懂]1.下面代码输出什么,为什么 //make([]T,length,capacity) s1:=[]int{1,2,3} fmt.Println(s1,”哈哈”)//[123] s2:=s1 fmt.Println(s1,”哈哈”)//[123] fori:=0;i<3;i++{ s2[i]=s2[i]+1 } fmt.Println(s1)//[234] fmt.Println(s2)//[234][12

    2022年6月29日
    89
  • 知识图谱(二)——知识推理

    知识图谱(二)——知识推理知识推理是知识图谱中很重要的一部分,主要用于推理暗含的知识(丰富知识图谱),检查知识库的不一致(知识清洗)知识推理分类演绎推理从一般到特殊的过程.从一般性的前提出发,通过推导,得到具体描述或个别结论(三段论),结论已经蕴含一般性知识中,只是通过演绎推理揭示出来,不能得到新知识.归纳推理从特殊到一般的推理过程.从一类事物的大量特殊事例出发,去推出该类事物的一般性结论(数学归纳法)…

    2022年6月1日
    66
  • php array_map与array_walk使用对比

    php array_map与array_walk使用对比

    2021年10月31日
    44
  • 2020 年 11 月程序员工资统计,平均 14327 元

    2020 年 11 月程序员工资统计,平均 14327 元

    2020年11月14日
    209

发表回复

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

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