tags:

views:

37

answers:

2

Hi,

In asp.net mvc, should I make my parameters in my action methods string or can I have them as Integers?

(say for page numbers)

+1  A: 

Page numbers should be integers, not strings. ASP.NET MVC will convert them appropiately (as long as they are actually integers).

And as I said in my comment to your question (and also noted by MasterMind), you can have any type as parameter to your action method.

Ronald Wildenberg
+1  A: 

You can have them of different types, even of your custom defined classes.

User