Skip to content

Hi .. insert value( asp.netusers) to another tbl mvc c#

sonal malhotra

Asked Dec 9, 2018, 11:20 PM EST3 answers
Share
LinkedInX
 new page controlller page 
C#
 public ActionResult Create()
        {

            List<SelectListItem> users = new List<SelectListItem>();
            foreach (var user in context.Users)
            {
                users.Add(new SelectListItem { Text = user.UserName, Value = user.Id });
            }
            ViewBag.Users = users;
}
[ httppost]
 public ActionResult Create()
 
 ???
} 
hello i m new learning mvc identitiy (user individual athentication).   how to set context.users (identity )  and  how to  insert value(context users )  to another new table 
 
 
 please
 
sharing is care  
thanks sonal 

3 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    first of all, clearly ask your question...then ask to member.
     
    Thank You :) 
    +1
  • +1
    hi how to insert value as(context asp.netusers ) to another table in new page(controller) using user individual athentication
    thanks sonal
    +1
  • +1
    first of all, check the user whose login to page...this user is authorized or not.
     
    In other words...verify the user with Email Confirmed(with email verification link) after the verified then the id of user authentication will be hit.
     
    after then, the hit value will be in insert the data in another table on just one click.
     
    without email verified the id of individual user accounts authentication in mvc will not be hit.
     
    Thanks :) 
    +1