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
yash patel
1.4k
286
21.4k
System.InvalidOperationException
Oct 1 2020 6:17 AM
This is my action method for new user registration and update user
public
ActionResult SignUp(User obj)
{
if
(obj !=
null
)
{
return
View(obj);
}
else
{
return
View();
}
}
This is view page
@model nsroute.BusinessObject.UserBO
@{
ViewBag.Title =
"Sign Up"
;
}
<body
class
=
"login"
>
<div
class
=
"wrapper wrapper-login"
>
<div
class
=
"container container-login animated fadeIn"
>
<img
class
=
"logo"
src=
"~/Content/assets/img/logo.jpg"
/>
@using (Html.BeginForm(
"SignUp"
,
"Account"
, FormMethod.Post))
{
<h3
class
=
"text-center"
>Register</h3>
<div
class
=
"login-form"
>
<div
class
=
"form-group"
>
@Html.HiddenFor(model=>model.UserId)
@Html.LabelFor(model => model.FullName,
new
{ @
class
=
"placeholder"
})
@Html.TextBoxFor(model => model.FullName,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.FullName,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.UserEmail,
new
{ @
class
=
"placeholder"
})
@Html.TextBoxFor(model => model.UserEmail,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.UserEmail,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.Password,
new
{ @
class
=
"placeholder"
})
@Html.PasswordFor(model => model.Password,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.Password,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.ConfirmPassword,
new
{ @
class
=
"placeholder"
})
@Html.PasswordFor(model => model.ConfirmPassword,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.ConfirmPassword,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.CompleteAddress,
new
{ @
class
=
"placeholder"
})
@Html.TextBoxFor(model => model.CompleteAddress,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.CompleteAddress,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.City,
new
{ @
class
=
"placeholder"
})
@Html.TextBoxFor(model => model.City,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.City,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group"
>
@Html.LabelFor(model => model.State,
new
{ @
class
=
"placeholder"
})
@Html.TextBoxFor(model => model.State,
new
{ @
class
=
"form-control"
})
</div>
<div>
@Html.ValidationMessageFor(model => model.State,
null
,
new
{ @
class
=
"text text-danger"
})
</div>
<div
class
=
"form-group form-action-d-flex mb-3"
>
<input type=
"submit"
value=
"Submit"
class
=
"btn btn-primary w-100 fw-bold"
/>
</div>
<div
class
=
"login-account"
>
<span
class
=
"msg"
>Already a Member , </span>
<a href=
"@Url.Action("
Login
", "
Account
")"
id=
"show-signup"
class
=
"link"
>Login Here</a> !
</div>
</div>
}
</div>
</div>
</body>
when clicking on update button the id including all other values is passed it is showing in the url also
but getting this error
The model item passed into the dictionary is of type 'nsroute.DataAccess.User', but this dictionary requires a model item of type 'nsroute.BusinessObject.UserBO'.
Reply
Answers (
3
)
How to display page number in rdlc reportviewer
object refrence is required for the non static field