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
mithun kumar
NA
21
3.6k
connection issue in mvc web application
Oct 27 2016 5:37 AM
hello
public ActionResult Login(Login model, string returnUrl)
{
if (ModelState.IsValid)
{
if (System.Web.Security.Membership.ValidateUser(model.UserName, model.Password))
{
SecurityUser secUser = AuthenticationCommands.GetSecurityUserByUsername(model.UserName);
CustomUserData customData = new CustomUserData();
customData.IsPersistent = model.RememberMe;
bool isActive = true;
//modified for remember me funcationality
if (customData.IsPersistent)
{
Response.Cookies["UserName"].Value = model.UserName;
Response.Cookies["PWD"].Value = model.Password;
Response.Cookies["UserName"].Expires = DateTime.Now.AddMonths(2);
Response.Cookies["PWD"].Expires = DateTime.Now.AddMonths(2);
}
this is the code for login in mvc web application its getting error sql server instance at the model.username, model.password line
Reply
Answers (
2
)
Search record by name in sql server.
SQL COALESCE Function