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;








0















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!










share|improve this question






























    0















    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!










    share|improve this question


























      0












      0








      0








      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!










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 25 at 18:36







      Diego Salazar

















      asked Mar 23 at 0:15









      Diego SalazarDiego Salazar

      63




      63






















          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
          );



          );













          draft saved

          draft discarded


















          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















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript