我是自动生成列的DataGrid.我在点编辑列(编辑).我想判断当前输入框不能为字母,和负数.应该怎么做啊!谢谢!
解决方案 »
- 從字元 (char) 字串轉換到 datetime 的語法錯誤。
- 如何在网站每个页面加导航,就是父页面>>子页面>>子子页面
- 判断语句出错!!为什么会提示当前上下文中不存在名称“Container”
- asp.net中page_load中如何延迟一定时间再触发某一按钮事件
- SqlCommandBuilder 批量更新问题(十万火急)
- |M| 网页排版的问题 一个Table分成几块的时候要怎么来分
- 请问C#里关于函数的问题,高手进
- datagrid一字段做了一个超链接,怎样在当前窗口显示!
- 高分急求:Windows 找不到文件 '"C:\Documents and Settings\Administrator\Local Settings\Temporary Internet Files\Content.IE5
- VS2003 中包含策略的小型分布式应用程序的项目依赖项问题???
- 各大高手救救我!
- msgbox在ASP。NET中怎么用啊 什么命名空间啊??
ShowFooter="True">
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<table height="26" cellSpacing="0" cellPadding="5" width="100%" border="0">
<tr>
<td width="4%" height="26">
<asp:CheckBox AutoPostBack="True" id="ckb_All" runat="server" OnCheckedChanged="AllSelect"></asp:CheckBox>
</td>
<td width="21%" height="26">商品名</td>
<td align="center" width="12%" height="26">市场价</td>
<td align="center" width="12%" height="26">会员价</td>
<td align="center" width="13%" height="26">vip价</td>
<td align="center" width="7%" height="26">数量</td>
<td align="center" width="13%" height="26">支付总额</td>
<td width="19%" height="26">
<p align="right">操作</p>
</td>
</tr>
<tr>
<td width="97%" colSpan="8" height="26">
<hr color="#c0c0c0" SIZE="1">
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td width="4%" height="26">
<asp:TextBox Visible=False id="ProductID" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ProductID")%>'>
</asp:TextBox>
<asp:CheckBox id="ckb_Select" runat="server"></asp:CheckBox>
</td>
<td width="21%" height="26"><%# Ccshop.App_Code.INC.format.Substring(DataBinder.Eval(Container.DataItem,"ProductName").ToString(),30)%></td>
<td align="center" width="12%" height="26">
<strike>
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice").ToString()))%>
<strike>
</td>
<td align="center" width="12%" height="26">
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice_h").ToString()))%>
</td>
<td align="center" width="13%" height="26">
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice_v").ToString()))%>
</td>
<td align="center" width="7%" height="26">
<%#DataBinder.Eval(Container.DataItem,"Number")%>
<asp:TextBox Width=20 ReadOnly=True Visible=False id="Number" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Number")%>'>
</asp:TextBox>
</td>
<td align="center" width="13%" height="26"><%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"Totle").ToString()))%></td>
<td width="19%" height="26">
<p align="right"><asp:Button ID="ib_Edit" class="t2" Text="编辑" CommandName="Edit" runat="server" CausesValidation="False"></asp:Button></p>
</td>
</tr>
</ItemTemplate>
<EditItemTemplate>
<tr bgcolor="#EFEFEF">
<td width="4%" height="26">
<asp:TextBox Visible=False id="eid" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"ProductID")%>'>
</asp:TextBox>
</td>
<td width="21%" height="26"><%# Ccshop.App_Code.INC.format.Substring(DataBinder.Eval(Container.DataItem,"ProductName").ToString(),30)%></td>
<td align="center" width="12%" height="26">
<strike>
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice").ToString()))%>
<strike>
</td>
<td align="center" width="12%" height="26">
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice_h").ToString()))%>
</td>
<td align="center" width="13%" height="26">
<%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"ProductPrice_v").ToString()))%>
</td>
<td align="center" width="7%" height="26">
<asp:TextBox Width=30 id="have" runat="server" Visible=False Text='<%#DataBinder.Eval(Container.DataItem,"have")%>'>
</asp:TextBox>
<asp:TextBox Width=30 id="enum" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Number")%>'>
</asp:TextBox><asp:RegularExpressionValidator ControlToValidate="enum" id="RegularExpressionValidator1" runat="server" ErrorMessage="!"
ValidationExpression="^([0-9]*|\d*)$"></asp:RegularExpressionValidator>
</td>
<td align="center" width="13%" height="26"><%# String.Format("{0:c}",int.Parse(DataBinder.Eval(Container.DataItem,"Totle").ToString()))%></td>
<td width="19%" height="26">
<p align="right"><asp:Button ID="Button1" class="t2" Text="修改" CommandName="update" runat="server"></asp:Button><asp:Button ID="Button6" class="t2" Text="撤销" CommandName="cancel" runat="server" CausesValidation="False"></asp:Button></p>
</td>
</tr>
</EditItemTemplate>
<FooterTemplate>
<tr>
<td width="97%" colSpan="8" height="26">
<hr color="#c0c0c0" SIZE="1">
</td>
</tr>
</table>
</FooterTemplate> </asp:TemplateColumn> </Columns> </asp:datagrid>