DetailsView添加完毕后,如何保留文本框中的值,我强行用findcontrol找到这个textbox,然后给他赋值,结果整个数据绑定直接失效!!
<asp:DetailsView ID="dv" runat="server" Width="125px" AutoGenerateRows="False"
DefaultMode="Insert" DataSourceID="p">
<Fields>
<asp:TemplateField HeaderText="名称型号" SortExpression="ProName">
<EditItemTemplate>
名称:
<asp:TextBox ID="p" EnableTheming="true" Width="200" runat="server" Text=' <%# Bind("p") %>'> </asp:TextBox>
添加完成后,p控件的值为什么不在了,空了,我没做任何跳转,如何记住p的值呢??
<asp:DetailsView ID="dv" runat="server" Width="125px" AutoGenerateRows="False"
DefaultMode="Insert" DataSourceID="p">
<Fields>
<asp:TemplateField HeaderText="名称型号" SortExpression="ProName">
<EditItemTemplate>
名称:
<asp:TextBox ID="p" EnableTheming="true" Width="200" runat="server" Text=' <%# Bind("p") %>'> </asp:TextBox>
添加完成后,p控件的值为什么不在了,空了,我没做任何跳转,如何记住p的值呢??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货