I need to take a value through textbox and assign the value inside a action..
i have an action like below..
public ActionResult Edit(int id)
{
id=1 //it works,but if
id=value from view //it does not work
}
How can i solve it??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Saineshwar BageriPosted Feb 26, 2015, 1:43 AM
Manish Kumar ChoudharyPosted Feb 26, 2015, 12:57 AM
If you want to make string input you need to change the signature of this function like
public ActionResult Edit(int id)
to
public ActionResult Edit(string id)