Wednesday, January 19, 2011

Insert Query in Linq in asp.net


protected void btn_insert_Click(object sender, EventArgs e)
    {
        var userInsert = new userCredential()
        {
            uname_db = TextBox1.Text,
            password_db = TextBox2.Text
        };
        mylinq.userCredentials.InsertOnSubmit(userInsert);
        mylinq.SubmitChanges(); 
    }

No comments:

Post a Comment