using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class _Default : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data
Source=(LocalDB)\\v11.0;AttachDbFilename=S:\\6001\\WebSite1\\App_Data\\[Link];Int
egrated Security=True");
SqlCommand cmd =[Link]();
[Link]();
[Link]="INSERT INTO Emp VALUES('"+[Link]
+"','"+[Link]+"')";
[Link]=con;
int flag= [Link]();
if (flag == 1)
{
[Link]("Insterted successfuly");
}
}
protected void Button2_Click(object sender, EventArgs e)
{
[Link]([Link]);
}
protected void Button4_Click(object sender, EventArgs e)
{
String inp=[Link]("Enter the id ","Search","",0,0);
SqlConnection con = new SqlConnection("Data
Source=(LocalDB)\\v11.0;AttachDbFilename=S:\\6001\\WebSite1\\App_Data\\[Link];Int
egrated Security=True");
SqlCommand cmd = [Link]();
[Link]();
[Link] = "DELETE from Emp where Id=" +inp ;
[Link] = con;
int flag = [Link]();
if (flag == 1)
{
[Link]("Deleted successfuly");
}
}
protected void Button3_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data
Source=(LocalDB)\\v11.0;AttachDbFilename=S:\\6001\\WebSite1\\App_Data\\[Link];Int
egrated Security=True");
SqlCommand cmd = [Link]();
[Link]();
[Link] = "UPDATE Emp set Name ='" + [Link] + "' where Id = " +
[Link]([Link]);
[Link] = con;
int flag = [Link]();
if (flag == 1)
{
[Link]("Updated successfuly");
}
}
}