TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Guest User
Tech Writer
271
36k
value cannot be null. parameter name string
Dec 15 2020 6:04 AM
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"
]);
// error in this line
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();
}
}
}
}
Reply
Answers (
4
)
using default value with same method name
Jenkins File Using Pipeline