Asp.Net中的一页 [英] A Page in Asp.Net

查看:50
本文介绍了Asp.Net中的一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Asp.Net上的音乐商店做最后一年的项目.但是我不知道如何将Asp.Net与Sqlserver(vs2008中集成的sqlexpress)连接.所以我需要有人通过创建带有文本框和按钮的asp.net页面来帮助我.在文本框中输入文本并单击按钮后,应使用数据库中文本框条目中的名称创建一个表.
请帮帮我.
我认为这将帮助我解决连接问题.

I am doing a final year project on music store in Asp.Net. But i don''t know how to connect Asp.Net with Sqlserver(integrated sqlexpress in vs2008). So i need someone to help me by creating a asp.net page with a textbox and button. After entering a text into the texbox and clicking the button should create a table with name from textbox entry in database.
Please help me.
I think this will help me with the connection problems.

推荐答案

这是非常基本的事情之一.我建议您在开始项目之前花一些时间学习ASP.NET.

我之所以这样说是因为,即使我为您提供了上述要求的代码,我也相信您会一次又一次地提出新的简单问题.您将无法及时完成项目.

因此,最好花一些时间了解基础知识然后开始开发.

网络上有很多教程.最好的起点是 http://www.asp.net/ [ http://www.asp.net/data-access/tutorials [^ ]

您可以在这里找到上述查询的答案: http://www.w3schools.com/aspnet/aspnet_dbconnection.asp [ ^ ]

最后但并非最不重要的一点是,充分利用Google等搜索引擎. Google是程序员最好的朋友.
以及有关文章和教程的CodeProject的知识.您可以在这里找到任何东西.

希望对您有所帮助.
干杯!
This is one of the very basic thing. I suggest you to spend sometime learning ASP.NET before you start the project.

I am saying this because even if I give you the code for your above requirement, I am sure you will come again and again with a new simple issue. You won''t be able to complete the project in time.

So it''s better to spend sometime understanding the basics and then start developing.

There are lots of tutorial available on the web. The best place to start is http://www.asp.net/[^].

Data-access tutorials can be found here: http://www.asp.net/data-access/tutorials[^]

You will find the answer for your above query here: http://www.w3schools.com/aspnet/aspnet_dbconnection.asp[^]

And last but not the least, take the maximum use of search engines like Google. Google is programmers best friend.
And for articles and tutorials CodeProject rocks. You can find anything and everything here.

I hope this helps.
Cheers!


尝试以下查询将在数据库中创建表.
公共无效AddTopic(字符串_name)
{
字符串_sql ="Create Table Tbl" + _name +(SrNo Varchar(40)主键,查询NVarchar(max),TopicId Varchar(40)引用TblTopics(TopicId),描述NVarchar(max),URL Varchar(500)) ;
DataHelper.ExecuteCommand(_sql);
}
Try Following query it will create table in database.
public void AddTopic(string _name)
{
string _sql = "Create Table Tbl" + _name + "(SrNo Varchar(40) Primary Key,Query NVarchar(max),TopicId Varchar(40) References TblTopics(TopicId),Description NVarchar(max),URL Varchar(500))";
DataHelper.ExecuteCommand(_sql);
}


请参阅下面的链接
将ASP.NET与SQL Server一起使用
see below link
Using ASP.NET With SQL Server


这篇关于Asp.Net中的一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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