How to display only the mail from the authenticated Identity user?How do I remove a property from a JavaScript object?How can I display a JavaScript object?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?I cant get this form to send email or redirect to the correct viewHow to filter DropDown list by logged in User in MVCValidation date - dd/mm/yyyy - not working on all pcmodelstate.isvalid false because the item always nullasp.net mvc 4 dropdown list with model isn't workingComplete drop down list when editing whit a Joining the table in Asp.net MVC 5
How long would it take for people to notice a mass disappearance?
Point of the Dothraki's attack in GoT S8E3?
What are the differences between credential stuffing and password spraying?
Identifying characters
I'm in your subnets, golfing your code
Can I use a fetch land to shuffle my deck while the opponent has Ashiok, Dream Render in play?
ZSPL language, anyone heard of it?
Does it make sense for a function to return an rvalue reference?
Why did the Apollo 13 crew extend the LM landing gear?
Proving n+1 th differential as zero given lower differentials are 0
Can there be a single technologically advanced nation, in a continent full of non-technologically advanced nations?
Are there any of the Children of the Forest left, or are they extinct?
Nominativ or Akkusativ
Building a list of products from the elements in another list
Is there an idiom that support the idea that "inflation is bad"?
Why does this derived table improve performance?
Find the cheapest shipping option based on item weight
Word meaning as function of the composition of its phonemes
What was the first story to feature the plot "the monsters were human all along"?
My advisor talks about me to his colleague
How do inspiraling black holes get closer?
Can my 2 children 10 and 12 Travel to the USA on expired American Passports? They are US citizens
Adjacent DEM color matching in QGIS
Where is the documentation for this ex command?
How to display only the mail from the authenticated Identity user?
How do I remove a property from a JavaScript object?How can I display a JavaScript object?How do I remove a particular element from an array in JavaScript?How do I return the response from an asynchronous call?I cant get this form to send email or redirect to the correct viewHow to filter DropDown list by logged in User in MVCValidation date - dd/mm/yyyy - not working on all pcmodelstate.isvalid false because the item always nullasp.net mvc 4 dropdown list with model isn't workingComplete drop down list when editing whit a Joining the table in Asp.net MVC 5
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I use Identity's authentication system. I need to obtain and match with the id, since, I need to create a record with the email of the user entered in the system.
public ActionResult Create()
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email");
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo");
return View();
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "OfPost_ID,OfPostOf_ID,OfPostUsr_ID,OfPostFecha")] OfertaPostulante ofertaPostulante)
if (ModelState.IsValid)
db.OfertaPostulante.Add(ofertaPostulante);
db.SaveChanges();
return RedirectToAction("Index");
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email", ofertaPostulante.OfPostUsr_ID);
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo", ofertaPostulante.OfPostOf_ID);
return View(ofertaPostulante);
And the view to show is this:
<div class="form-horizontal">
<h4>OfertaPostulante</h4>
<hr />
@Html.ValidationSummary(true, "", new @class = "text-danger" )
<div class="form-group">
@Html.LabelFor(model => model.OfPostOf_ID, "OfPostOf_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostOf_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.OfPostOf_ID, "", new @class = "text-danger" )
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.OfPostUsr_ID, "OfPostUsr_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostUsr_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.AspNetUsers.Email, "", new @class = "text-danger" )
</div>
</div>
I need the id, user or email, appear by default and not modifiable in the dropwdown (because I get all emails from "AspNetUsers" and the email randomly)
View
Please, thanks!
javascript c# asp.net model-view-controller asp.net-mvc-5
add a comment |
I use Identity's authentication system. I need to obtain and match with the id, since, I need to create a record with the email of the user entered in the system.
public ActionResult Create()
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email");
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo");
return View();
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "OfPost_ID,OfPostOf_ID,OfPostUsr_ID,OfPostFecha")] OfertaPostulante ofertaPostulante)
if (ModelState.IsValid)
db.OfertaPostulante.Add(ofertaPostulante);
db.SaveChanges();
return RedirectToAction("Index");
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email", ofertaPostulante.OfPostUsr_ID);
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo", ofertaPostulante.OfPostOf_ID);
return View(ofertaPostulante);
And the view to show is this:
<div class="form-horizontal">
<h4>OfertaPostulante</h4>
<hr />
@Html.ValidationSummary(true, "", new @class = "text-danger" )
<div class="form-group">
@Html.LabelFor(model => model.OfPostOf_ID, "OfPostOf_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostOf_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.OfPostOf_ID, "", new @class = "text-danger" )
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.OfPostUsr_ID, "OfPostUsr_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostUsr_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.AspNetUsers.Email, "", new @class = "text-danger" )
</div>
</div>
I need the id, user or email, appear by default and not modifiable in the dropwdown (because I get all emails from "AspNetUsers" and the email randomly)
View
Please, thanks!
javascript c# asp.net model-view-controller asp.net-mvc-5
add a comment |
I use Identity's authentication system. I need to obtain and match with the id, since, I need to create a record with the email of the user entered in the system.
public ActionResult Create()
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email");
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo");
return View();
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "OfPost_ID,OfPostOf_ID,OfPostUsr_ID,OfPostFecha")] OfertaPostulante ofertaPostulante)
if (ModelState.IsValid)
db.OfertaPostulante.Add(ofertaPostulante);
db.SaveChanges();
return RedirectToAction("Index");
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email", ofertaPostulante.OfPostUsr_ID);
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo", ofertaPostulante.OfPostOf_ID);
return View(ofertaPostulante);
And the view to show is this:
<div class="form-horizontal">
<h4>OfertaPostulante</h4>
<hr />
@Html.ValidationSummary(true, "", new @class = "text-danger" )
<div class="form-group">
@Html.LabelFor(model => model.OfPostOf_ID, "OfPostOf_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostOf_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.OfPostOf_ID, "", new @class = "text-danger" )
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.OfPostUsr_ID, "OfPostUsr_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostUsr_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.AspNetUsers.Email, "", new @class = "text-danger" )
</div>
</div>
I need the id, user or email, appear by default and not modifiable in the dropwdown (because I get all emails from "AspNetUsers" and the email randomly)
View
Please, thanks!
javascript c# asp.net model-view-controller asp.net-mvc-5
I use Identity's authentication system. I need to obtain and match with the id, since, I need to create a record with the email of the user entered in the system.
public ActionResult Create()
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email");
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo");
return View();
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Create([Bind(Include = "OfPost_ID,OfPostOf_ID,OfPostUsr_ID,OfPostFecha")] OfertaPostulante ofertaPostulante)
if (ModelState.IsValid)
db.OfertaPostulante.Add(ofertaPostulante);
db.SaveChanges();
return RedirectToAction("Index");
ViewBag.OfPostUsr_ID = new SelectList(db.AspNetUsers, "Id", "Email", ofertaPostulante.OfPostUsr_ID);
ViewBag.OfPostOf_ID = new SelectList(db.OfertaLaboral, "Of_ID", "Of_Titulo", ofertaPostulante.OfPostOf_ID);
return View(ofertaPostulante);
And the view to show is this:
<div class="form-horizontal">
<h4>OfertaPostulante</h4>
<hr />
@Html.ValidationSummary(true, "", new @class = "text-danger" )
<div class="form-group">
@Html.LabelFor(model => model.OfPostOf_ID, "OfPostOf_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostOf_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.OfPostOf_ID, "", new @class = "text-danger" )
</div>
</div>
<div class="form-group">
@Html.LabelFor(model => model.OfPostUsr_ID, "OfPostUsr_ID", htmlAttributes: new @class = "control-label col-md-2" )
<div class="col-md-10">
@Html.DropDownList("OfPostUsr_ID", null, htmlAttributes: new @class = "form-control" )
@Html.ValidationMessageFor(model => model.AspNetUsers.Email, "", new @class = "text-danger" )
</div>
</div>
I need the id, user or email, appear by default and not modifiable in the dropwdown (because I get all emails from "AspNetUsers" and the email randomly)
View
Please, thanks!
javascript c# asp.net model-view-controller asp.net-mvc-5
javascript c# asp.net model-view-controller asp.net-mvc-5
edited Mar 25 at 18:36
Diego Salazar
asked Mar 23 at 0:15
Diego SalazarDiego Salazar
63
63
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309359%2fhow-to-display-only-the-mail-from-the-authenticated-identity-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55309359%2fhow-to-display-only-the-mail-from-the-authenticated-identity-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown