开发者

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.


I like the above tutorial - however, a simpler method may be using AJAX to communicate directly to an .asp as shown in the example from 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜