I am attempting to pass data from a view to a controller in my .net application. I want to do this while keeping as much of the original html syntax as possible since it and the corresponding css were imported form adobe muse. I created the following model i am attempting to fill:
public class LoginModel
{
public string Email { get; set;}
public string Password { get; set; }
}
I am attempting to retrieve the input in the following method:
[HttpPost]
public IActionResult LoginBody(LoginModel info)
{
System.Diagnostics.Debug.WriteLine(email);
System.Diagnostics.Debug.WriteLine(password);
return View();
}
My html is:
<form class="form-grp clearfix grpelem" id="widgetu732" method="post" enctype="multipart/form-data" action="">
<div class="clearfix grpelem" id="u733-4">
</div>
<div class="clearfix grpelem" id="u734-4">
</div>
<div class="clearfix grpelem" id="u743-4">
</div>
<button class="submit-btn NoWrap clearfix grpelem" id="u744-3" type="submit" value=" " tabindex="3">
<div style="margin-top:-13px;height:13px;">
<p> </p>
</div>
</button>
<div class="fld-grp clearfix grpelem" id="widgetu749" data-required="true">
<label class="fld-label actAsDiv clearfix grpelem" id="u752-4" for="widgetu749_input"><!-- content --><span class="actAsPara">PASSWORD:</span></label>
<span class="fld-input NoWrap actAsDiv clearfix grpelem" id="u750-4" placeholder="PASSWORD"><!-- content --><input class="wrapped-input" type="text" id="widgetu749_input" name="Password" tabindex="2" /></span>
</div>
<div class="fld-grp clearfix grpelem" id="widgetu735" data-required="true">
<label class="fld-label actAsDiv clearfix grpelem" id="u738-4" for="widgetu735_input"><!-- content --><span class="actAsPara">EMAIL:</span></label>
<span class="fld-input NoWrap actAsDiv clearfix grpelem" id="u737-4" placeholder="EMAIL"><!-- content --><input class="wrapped-input" type="text" id="widgetu735_input" name="Email" tabindex="1" /></span>
</div>
</form>
How should I modify my html to be able to receive the input?