hmahdavi
hmahdavi

Reputation: 2352

How to send a string value to the action in mvc?

I try to send a string value such as '2016/01/02' to the action .I fill this date into the href attribute of a tag such as this:

 <a href="/Charter/CharterList/@item.FlightDateFull">1111111111</a>

but when run my website get error.

HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Url of this page : http://localhost:40634/Charter/CharterList/13952016/02/02 How to fix this?

Upvotes: 0

Views: 38

Answers (1)

Rusty
Rusty

Reputation: 4473

There are many other ways.
But to keep it all simple you can do

@item.FlightDateFull.toString("DD-MM-yyyy")

Upvotes: 1

Related Questions