[英]How does SQL Server exchange data with a webform
I'm beginner at C#, asp.net and I took a course about databases (fundamentals of Databases) I wouldn't ask such question because: 我是C#,asp.net的初学者,并且上了一门有关数据库(数据库基础知识)的课程,我不会问这样的问题,因为:
The thing I am required to do is an e-commerce project (small one) and I am stuck after connecting the database from SQL Server to Visual Studio using server explorer? 我需要做的是一个电子商务项目(小项目),使用服务器资源管理器将数据库从SQL Server连接到Visual Studio之后,我被卡住了吗?
How in a simple manner can I send SQL queries and retrieve data and display it? 如何以一种简单的方式发送SQL查询并检索和显示数据?
The problem is I have asked this while they know we didn't take web programming courses and I have to deliver the project next week (e-shopping cart + registration + signing in) !!!! 问题是我问这个问题的时候,他们知道我们没有参加网络编程课程,所以我必须在下周交付该项目(电子购物车+注册+登录)!
Thank you for the help. 感谢您的帮助。
我喜欢上面的教程-但是,更简单的方法可能是使用AJAX直接与.asp通信,如W3Schools中的示例所示: http : //www.w3schools.com/ajax/ajax_database.asp
The "modern" answer from a web app perspective is to use the Entity Framework or LINQ to SQL. 从Web应用程序角度来看,“现代”答案是使用Entity Framework或LINQ to SQL。 The problem is that I'm not sure that's what they want you to do. 问题在于我不确定那是他们想要你做的。 There even "Dynamic data" Websites that pretty much build the whole thing for you: http://msdn.microsoft.com/en-us/library/cc488469.aspx 甚至还有“动态数据”网站都可以为您构建整个网站: http : //msdn.microsoft.com/zh-cn/library/cc488469.aspx
If you need more old school SQL access, look for tutorials on ADO.NET dataAdapters or dataReaders. 如果您需要更多老式SQL访问,请查找有关ADO.NET dataAdapters或dataReaders的教程。 try this: http://weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx 试试这个: http : //weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.