如何从详细信息视图插入记录 [英] how to insert records from details view

查看:82
本文介绍了如何从详细信息视图插入记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个详细信息视图,该视图从数据库中检索记录并自动生成插入,编辑按钮....
我如何在cs页面上而不是aspx中使用C#编写这些自动生成按钮的代码?因此,我们知道您正在从事Web开发.

您编写了一个适当的数据层,以便没有SQL出现在aspx或cs中,并且将按插入或编辑按钮时显示的控件中的数据传递给它.然后,您重新绑定到数据源,以便新数据显示在控件中.


Hi I have a details view which retrieves records from the database and an auto generate insert,edit buttons....
How do i code these autogenerate buttons using C# on the cs page and not in the aspx

解决方案

If you''re using ASP.NET, you should tag your question accordingly so we know you''re doing web dev.

You write a proper data layer, so that no SQL ever appears in your aspx or your cs, and you pass it the data taken from the controls that are shown when you push the insert or edit buttons. Then you rebind to your data source so the new data is shown in the control.


这篇关于如何从详细信息视图插入记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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