如何在ASP.NET中更新表中的数据 [英] How to update data in a table in asp.net
本文介绍了如何在ASP.NET中更新表中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个雇员表.
我试图在其中插入数据.现在,我想更新其中的数据.为此,我使用了网格视图.现在知道我必须使用以下关键词.
< asp:GridView ID =" ="span>
span> 运行 ="
span> AutoGenerateColumns ="
span> DataKeyNames ="
span> onrowcancelingedit ="
onrowediting ="
onrowdeleting ="
继续更新 =" >
我已经使用了用于更新,删除的方法,但是我不知道将这些方法放在哪里.请告诉我在哪里使用.
由于我是.net的新手,所以请以一种更简单的方式向我解释,以便我能够理解.
解决方案
请参阅这些相关文章
使用Gridview插入,更新,删除...简单方式 [ ^ ]
在ASP.NET 2.0中可编辑GridView [ ^ ]
^ ]
http://www.velocityreviews.com/forums/t705244-i-want-the-code-for-rowupdating-and-rowdeleting-for-gridview-control-in-following-cod.html [<asp:GridView ID="EmployeeGridView" runat="server" AutoGenerateColumns="False" DataKeyNames="Emp_id" onrowcancelingedit="EmployeeGridView_RowCancelingEdit" onrowediting="EmployeeGridView_RowEditing" onrowdeleting="EmployeeGridView_RowDeleting" onrowupdating="EmployeeGridView_RowUpdating">
I have used methods for updating, deleting but I don''t know where to place those methods. Please tell me where to use it.
As i am new to .net, explain me in a easier way, so that I could be able to understand.解决方案Refer these aricles
Insert, Update, Delete with Gridview ... Simple Way[^]
Editable GridView in ASP.NET 2.0[^]
http://stackoverflow.com/questions/5893373/c-sharp-rowupdating-method-not-called-when-update-is-clicked-in-a-gridview?answertab=active#tab-top[^]
http://www.velocityreviews.com/forums/t705244-i-want-the-code-for-rowupdating-and-rowdeleting-for-gridview-control-in-following-cod.html[^]
Check these two links...if you face any difficulty post it..
这篇关于如何在ASP.NET中更新表中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文