gridview不能更新 代码好长。。断点调试一下检查SQL语句。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 72绝技是什么?跟孙悟空学的?推荐那个老调牙的asp.net2.0入门教程来入门(当时还没有asp.net ajax):http://lovecherry.cnblogs.com/lovecherry/archive/2006/07/02/440840.html 比如把javascript的windows.open语句也作为“GridView绝技”了,这种做法是不对的,根本没有什么关系。如果GridView才有10种,而组合上javascript的100种,可能弄出个“1000种GridView绝技”来,然后实际这1000种里边把专门讲GridView的东西冲淡得全无了。学GridView,最好只看系统讲解GridView本身的架构应用的专著。 代码太长了 你看下你绑定好了没?然后事件处置后 重新绑定没 看下SQL语句 F11单步调试<ItemTemplate> <%# Eval("name") %> </ItemTemplate> <EditItemTemplate > <asp:TextBox ID="TextBox1" runat="server" Text=' <%# Eval("name") %>' width="50"> </asp:TextBox> </asp:TextBox> <ItemTemplate><asp:LinkButton ID="LinkButton1" runat="server" CommandName="edit" CausesValidation="false" OnClientClick="return confirm('确认要编辑吗?');">编辑</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server" CommandName="delete" CausesValidation="False" OnClientClick="return confirm('确认要删除吗?');">删除</asp:LinkButton> <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Select" CausesValidation="False" Visible="false" >选取</asp:LinkButton></ItemTemplate> protected void gv_RowUpdating(object sender, GridViewUpdateEventArgs e) { gv.EditIndex = e.RowIndex; string str= ((TextBox)gv.Rows[e.RowIndex].FindControl("TextBox1")).Text.Trim();...BindData(); } 关于.net里的Request.Form问题 关于ChildRelations的问题 添加IEWeb控件出错 有关SqlServer乱码的问题? 页面刷新问题(iframe的刷新) 关于页面传递参数的问题 请教高手:水晶报表与oracle的绑定 关于DataSet和数据源的问题,大家帮忙! 怎样引用web.config内的信息? 在客户端调用服务器端aspx文件出现500内部错误,如何解决?thanks advance sql2005还原数据库问题!!急。 用户表中的密码
http://lovecherry.cnblogs.com/lovecherry/archive/2006/07/02/440840.html
<ItemTemplate>
<%# Eval("name") %>
</ItemTemplate>
<EditItemTemplate >
<asp:TextBox ID="TextBox1" runat="server" Text=' <%# Eval("name") %>' width="50"> </asp:TextBox>
</asp:TextBox>
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" CommandName="edit" CausesValidation="false" OnClientClick="return confirm('确认要编辑吗?');">编辑</asp:LinkButton>
<asp:LinkButton ID="LinkButton2" runat="server" CommandName="delete" CausesValidation="False" OnClientClick="return confirm('确认要删除吗?');">删除</asp:LinkButton>
<asp:LinkButton ID="LinkButton3" runat="server" CommandName="Select" CausesValidation="False" Visible="false" >选取</asp:LinkButton>
</ItemTemplate> protected void gv_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
gv.EditIndex = e.RowIndex;
string str= ((TextBox)gv.Rows[e.RowIndex].FindControl("TextBox1")).Text.Trim();
...
BindData();
}