hi
I am stuck in this error "value cannot be null. parameter name string"
- protected void btnupdate_Click(object sender, EventArgs e)
- {
- if (Page.IsValid)
- {
- using (var context = new schoolDbContext())
- {
- var UserName = txtUserName.Text;
- var id = Int32.Parse(Request.QueryString["Id"]);
- var std = (from x in context.Users
- where x.Id == id
- select x).First();
- if (std != null)
- {
- std.UserName = txtUserName.Text;
- std.FirstName = txtFirstName.Text;
- std.LastName = txtLastname.Text;
- std.ClassAssigned = txtClassAssigned.Text;
- std.Qualification = txtQualification.Text;
- std.UserType = ddlType.SelectedValue;
- std.Email = txtEmail.Text;
- std.ContactNo = txtContact.Text;
- context.SaveChanges();
- }
- }
- }
- }