newuserreg.aspx.cs

来自「A Portal for uploading images, videos an」· CS 代码 · 共 32 行

CS
32
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class newuserreg : System.Web.UI.Page
{
    SqlConnection sqlcon = new SqlConnection();
    SqlCommand sqlcmd = new SqlCommand();
    String connectionString = "Data Source=jpsoft02;Initial Catalog=starsparkz;Integrated Security=True";
    Int32 uid = 0;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click1(object sender, EventArgs e)
    {
        SqlConnection sqlcon = new SqlConnection(connectionString);
        sqlcon.Open();
        SqlCommand sqlcmd = new SqlCommand("insert into mylogintable values ('" + txtusname.Text + "','" + txtfname.Text + "','" + txtlname.Text + "','" + txtpass.Text + "', 0, '" + txtemail.Text + "','" + txtaemail.Text + "')", sqlcon);
        SqlDataReader sqldr = sqlcmd.ExecuteReader();
        Response.Redirect("prophotoup.aspx");
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?