User talk:Sudarshankii

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

public partial class Product : System.Web.UI.Page {   protected void Page_Load(object sender, EventArgs e)    {

}   protected void Button1_Click(object sender, EventArgs e)    { DataClassesDataContext context = new DataClassesDataContext; product pro = new product; pro.PID=int.Parse(TextBox1.Text); pro=(from data in context.products where data.PID==pro.PID select data).First; pro.ProductName = TextBox2.Text; pro.Price=Int64.Parse(TextBox3.Text); context.SubmitChanges; }   protected void Button2_Click(object sender, EventArgs e)    { DataClassesDataContext context = new DataClassesDataContext; product pro = new product; pro.PID = int.Parse(TextBox1.Text); pro.ProductName = TextBox2.Text; pro.Price=Int64.Parse(TextBox3.Text); context.products.InsertOnSubmit(pro); context.SubmitChanges; } }