protected void TextBox2_Click(object sender, EventArgs e)
{
using (SuperFastEntities db = new SuperFastEntities())
{
sample u = new sample();
u.name = sname.Text;
string id = Session["username"].ToString().Trim();
u.userID =Convert.ToInt32(id);
db.samples.Add(u);
db.SaveChanges();
}
Here is my code but not successfull. can somone help please!!