如何创建将存储来自在线网站注册数据的数据库

人气:889 发布:2022-09-22 标签: asp.net ASP.NET

问题描述

你好团队, 我刚刚在我的第一个网站上在线发布我的asp.net项目。 我已为用户提供注册选项,以便我在本地计算机上了解网站用户数据 ,这很容易使用正常连接将数据存储在我的系统SQL服务器数据库中 当我们去网上时,存储Facebook等注册选项等数据以便如何创建该数据库?

Hi team, I have just publish my asp.net project online on my first website. I have put registration option for users so that I come to know website user data on local computer, it is easy to store that data in my system SQL server database with normal connection When we go for online , for storing data like Facebook sign up options etc so How to create that Database ?

推荐答案

为数据库创建脚本,即表,SP,触发器,视图等,并在远程数据库上运行它。您必须具有预生产/生产服务器的IP地址和凭据。连接并测试。 Create script for the DB i.e., tables, SP, triggers, views etc and run it on the remote Database. You must have IP address and credentials for the preproduction/production server. Connect it and test.

如果你在localhost系统中托管它,那么它很简单,点击注册按钮后,你需要使用将数据存储到数据库中 If you hosted it in localhost systems,then it is so simple,after clicking on registration button,u need to store the data into database by using
SqlCommand cmd = new SqlCommand("insert into Registration(UserID,FirstName,LastName,Address,ContactNo,DOB,Gender,EmailID) values('" + Label17.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + RadioButtonList1.SelectedItem.Text + "','" + TextBox7.Text + "')", con);

519

上一篇:C#兼容的CAD库

下一篇:DevCenter广告报告