简体   繁体   中英

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:

  • I know it's too much maybe in one question
  • it is stacked between real questions :)

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?

How in a simple manner can I send SQL queries and retrieve data and display it?

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. 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

If you need more old school SQL access, look for tutorials on ADO.NET dataAdapters or dataReaders. try this: http://weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM