GridView1使用Label ,TextBox 及隐藏Label,让TextBox使用日期控件EditItemTemplate效果,并后台获其取值,
来源:互联网 发布:上瘾网络剧全集在线看 编辑:程序博客网 时间:2024/05/22 01:27
前台:
<asp:TemplateField HeaderText="开发票日期">
<ItemTemplate>
<asp:Label ID="Invoice_date_0" runat="server" Text='<%# Bind("Invoice_date","{0:d}") %>' ></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="Invoice_date" runat="server" Text='<%# Bind("Invoice_date","{0:d}") %>' ></asp:TextBox>
<asp:CalendarExtender ID="Txt_Confirm_Date_CalendarExtender" runat="server" Enabled="True"
TargetControlID="Invoice_date">
</asp:CalendarExtender>
</EditItemTemplate>
<ControlStyle Width="80px" />
<HeaderStyle Width="80px" />
</asp:TemplateField>
隐藏控件:
<asp:TemplateField HeaderText="ID" Visible="false">
<ItemTemplate>
<asp:Label ID="ID_R" runat="server" Text='<%# Eval("ID") %>' />
</ItemTemplate>
</asp:TemplateField>
后台:
string Ror_id = ((Label)this.GridView1.Rows[e.RowIndex].FindControl("ID_R")).Text.ToString();//取得隐藏值
string Invoice_date = ((TextBox)GridView1.Rows[e.RowIndex].FindControl("Invoice_date")).Text.ToString();//开发票日期
- GridView1使用Label ,TextBox 及隐藏Label,让TextBox使用日期控件EditItemTemplate效果,并后台获其取值,
- label textbox使用sqldatasource 绑定数据
- TextBox Vs Label
- Label挡住TextBox
- TextBox Button Label标签
- 文本服务器控件(标签Label控件和文本框(TextBox)控件)
- UserControl自定义控件系列一:Label+TextBox组合控件
- textbox控件的使用
- VB6控件玩组合:label+textbox+commandbutton+listview
- 关于TextBox,Label,DataGridView等控件的鼠标拖动实现
- js获取asp.net服务器端控件Label,TextBox,RadioButtonList,DropD
- Label控件的使用
- DataList 中DropDownList取隐藏控件label的值
- js 获取 asp.net 服务器端控件 Label 与 TextBox RadioButtonList 与 DropDownList 的值
- js 获取 asp.net 服务器端控件 Label 与 TextBox RadioButtonList 与 DropDownList 的值
- js 获取 asp.net 服务器端控件 Label 与 TextBox RadioButtonList 与 DropDownList 的值
- js获取asp.net服务器端控件Label,TextBox,RadioButtonList,DropDownList的值
- js 获取 asp.net 服务器端控件 Label 与 TextBox RadioButtonList 与 DropDownList 的值
- POJ3278
- Oracle内存详解之一 整体架构
- new 与 operator new,placement new
- Linux的LiveCd与CD、DVD版
- Oracle Listener 动态注册 与 静态注册 说明
- GridView1使用Label ,TextBox 及隐藏Label,让TextBox使用日期控件EditItemTemplate效果,并后台获其取值,
- 黑马程序员—银行业务调度系统
- 为你的Linux系统分区:基本原理
- 多线程导出word
- ERROR: Application requires API version 10. Device API version is 8 (Android 2.2).
- SELECT INTO 和 INSERT INTO SELECT 两种表复制语句
- QT
- js判断一个对象是否存在
- 堆排序