在ASP.NET数据库中的页面上显示数据 [英] displaying of the data on a page from database in asp.net

查看:290
本文介绍了在ASP.NET数据库中的页面上显示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...我在数据库中有一个id,主题和数据字段,并使用一个简单的表单将这些值插入数据库并在form下方的网格上显示详细信息.我的要求是当我单击网格中该特定记录上的编辑按钮..我想转移到另一页上.在另一页中,我希望以id,subject和date字段显示类似的表单,并且控件中的数据应该已经存在.如果我想编辑一些数据...我将然后单击更新按钮,以便更新数据,然后将页面重定向到上一页,在该页面上我显示了所有记录...任何人都可以发送给我完整的代码,以便可以解决我的要求....此外,如果我在网格中的特定行上单击删除,则应删除记录.
谢谢

hi...i have a id,subject and a data feilds in the database and using a simple form i have inserted these values into database and displayed the details on a grid just below the form.my requirement is that when i click an edit button on that particular record in the grid..i want to transfer onto a different page.in the other page i want a similar form to be displayed with id,subject and date fields and data in the controls should already be present .if i want to edit some data ...i will and then i click on update button so that the data is updated and then the page should be redirected to the previous page where i displayed all the records...can anyone send me full code so that it can solve my requirement....and also if i click on delete on a particular row in the grid that record should be deleated.
thanks

推荐答案

Sridharkameshetty写道:
Sridharkameshetty wrote:

任何人都可以向我发送完整的代码,以便它可以解决我的要求

can anyone send me full code so that it can solve my requirement



我想我必须向你澄清一些事情.在这里,全世界的人们都自愿参加,以帮助尝试过某些事情并且遇到特定编程问题的编码人员.
如果您正在寻找可以为您的要求编写代码的人,那么这里不是正确的地方.
但是,由于我们在这里寻求帮助,因此我也将为您提供帮助.这里有一些链接可能会解决您的问题.
http://www.rentacoder.com/RentACoder/DotNet/default.aspx [ ^ ]
www.getacoder.com/ [ ^ ]



I think I must clarify something to you. This is a place where people from whole round the world participate voluntarily to help fellow coders who have tried something and have specific programming issues.
If you are looking for someone who would write code for your requirement, this is not the right place.
But since we are here for help, I will help you with this too. Here are few links which would probably solve your issue.
http://www.rentacoder.com/RentACoder/DotNet/default.aspx[^]
www.getacoder.com/[^]


Sridharkameshetty写道:
Sridharkameshetty wrote:

有人可以发给我吗完整的代码,以便可以解决我的要求....

can anyone send me full code so that it can solve my requirement....



我明确同意安库尔先生所说的100%正确



I clearly agree with Mr.Ankur what he said is 100% right

Sridharkameshetty写道:
Sridharkameshetty wrote:

此外,如果我在网格中的特定行上单击删除,则该记录应被删除.

and also if i click on delete on a particular row in the grid that record should be deleated.



先生,请雇用我从事这项工作,您的所有要求(仅针对C#中的项目)都将得到满足:笑:

现在,关于您所谓的需求,我建议您使用SqlDataAdapter及其更新方法,您已完成
现在我有一个坏习惯,通常是用烘焙代码来帮助人们,但是从现在开始就不会发生这种情况,如果您想要我的烘焙代码,请用您尝试的代码更新您的问题,或者使用我对更新方法的建议乡亲...

在ado.net上获取一本好书,以进行所有这些小的查询

谢谢&问候
基:rose:



Sir please hire me for the job and all your requirements (regarding the project in c# only) will be satisfied :laugh:

Now about your so called requirement i would suggest u, use SqlDataAdapter and its update method and you are done
Now i have the bad habit of usually helping people with baked code but from now its not gona happen, if u want a baked code from me then please update your question with the code that u tried or use my suggestion of the update method thats all folks...

Grab a good book on ado.net for doing all this small small queries

Thanks & Regards
Radix :rose:


这篇关于在ASP.NET数据库中的页面上显示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆