var context = new LinqSampleDataContext(SPContext.Current.Web.Url);
EntityList<LoginItem> login_Insert =
context.GetList<LoginItem>("Login");
LoginItem NewREc = new LoginItem()
{Title=txtUserName.Text,Password=txtPassWord.Text };
login_Insert.InsertOnSubmit(NewREc);
context.SubmitChanges();
txtUserName.Text = "";
txtPassWord.Text = "";
this.Controls.Add(new LiteralControl("Insertion
Successful"));
EntityList<LoginItem> login_Insert =
context.GetList<LoginItem>("Login");
LoginItem NewREc = new LoginItem()
{Title=txtUserName.Text,Password=txtPassWord.Text };
login_Insert.InsertOnSubmit(NewREc);
context.SubmitChanges();
txtUserName.Text = "";
txtPassWord.Text = "";
this.Controls.Add(new LiteralControl("Insertion
Successful"));
No comments:
Post a Comment