asp.net mvc default parameter attribute -


is there way set default value on parameter not passed, eg:

    public actionresult index(int? page)     {} 

i'd have page=0 if no page passed, can remove nullable symbol. not want in routing, on action itself.

have tried:

public actionresult index(int page = 0) {} 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -