MVC ActionLink Error: Cannot convert from int to string

50 views Asked by At

I'm trying to pass the value that is displayed as action link to the controller as a parameter as below.

@Html.ActionLink(Convert.ToInt32(@row["SerialNo"]), GetPrvsIODtls, Home, new {SerialNo = row["SerialNo"]}, null)

But while Execution I get the error exception saying

"CS1503: Argument2:cannot convert from int to string".

0

There are 0 answers