Hi sureshMGR,
Inorder to get the value in controller Action method you need to specify the name property of HTML input same as name of the parameter.
Check the example.
Controller
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult AppRedirect(string username, string userPwd)
{
return RedirectToAction("Index", "Home");
}
}
View
<%using (Html.BeginForm("AppRedirect", "Home", FormMethod.Post))
{ %>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-top-15">
<div id="frm_Grp_Furnace_User_Name" class="form-group">
<label class="control-label font-sm bold">
<i class="fa fa-user-circle"> </i>UserName</label>
<div class="control">
<input id="txt_Furnace_User_Name" name="username" type="text" placeholder="UserName"
class="form-control font-md" />
</div>
</div>
<div id="frm_Grp_Furnace_User_Password" class="form-group">
<label class="control-label font-sm bold">
<i class="fa fa-lock"> </i>Password</label>
<div class="control">
<input id="txt_Furnace_User_Password" name="userPwd" type="password" placeholder="Password"
class="form-control font-md" />
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 img-container margin-top-10">
</div>
<div class="form-group text-center">
<button class="btn btn-flat btn-info font-lg margin-top-10 furnace-login">
<i class="fa fa-sign-in" style="font-size: 18px;"> </i>Login</button>
</div>
</div>
<%} %>
Screenshot
Values in controller