1.first create table for all record name and save .
2 add new item and select web from and add default.aspx page.
3.design the page for all database table entity.
4. select sqldatasources and check test query.
5 select connection path
5.coding default.aspx.cs page
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class SINUP : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"path");
//copy path & path paste
SqlCommand cmd;
SqlDataReader dr;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string strinsert = "Insert intodetails()values()";
//details( type all entites in same database tabel) vales is create a vriable
example for insert into details(user,password name)values(@u,@p,@n);
cmd = new SqlCommand(strinsert, con);
con.Open();
cmd.Parameters.AddWithValue("@u", TextBox1.Text);
cmd.Parameters.AddWithValue("@p", TextBox1.Text);
cmd.Parameters.AddWithValue("@n", TextBox1.Text);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("default.aspx");
Literal1.Text = "Record insert successfully";
}
Ndebata, if this helps please login to Mark As Answer. | Alert Moderator