DataSet For Insert
No need the connection
Take a web app
open a new form
and open a dataset in ur solution explorer
after go to server explorer
choose ur database
and select ur table
drag the table in your dataset
select the fill data() r click it
select add and choose Querry
click next upto finish
choose in the right format
here i am taken two text box and one button
and
and goto ur coding page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication3
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
DataSet1TableAdapters.hTableAdapter dta = new DataSet1TableAdapters.hTableAdapter();
dta.InsertQuery(TextBox1.Text, TextBox2.Text);
}
}
}