Click here to Skip to main content
14,877,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i use the following Code than i dont get the the command/value on my contoller At buttonclick.


<input id="btnCreateNew" type="submit" src="@Url.Content("../../Image/create_new.GIF")" name="Command" value="CreateNew" >


and My Controller it is like that...



public ActionResult Index(string Command, FormCollection fm)
{
if (Command=="CreateNew")
lm = new LocationModel();
lm.location_id = 0;
var GridData = lm.Get_LocationData(lm);//.GetStateData(searchdata);
return View(GridData);
}

please revert thanks in advance...ASAP.:)
Posted
Comments
[no name] 4-May-14 4:09am
   
Why dont you use HttpGet and HttpPost method for the action methods!!:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900