Have a look at this VB.NET code:
Protected Sub ShowForms(<ParamFormat(Formats.Year4)> ByVal year As
Formats is a Module/static class and Year4 a string constant: "0000".
The rendered URL looks like this:
Do you have any ideas or solutions for this?
I've been able to reproduce the problem and I understand where the
problem comes from. Unfortunately, there is no easy way the PageMethods
add-in can get the value of constants. PageMethods uses Visual Studio's
code model, which only provides "Formats.Year4" as the argument for the
ParamFormat attribute. I haven't found a way to evaluate
"Formats.Year4" to get "0000".
Maybe this is something you'll be able to do once we use a different
parser, but for the moment, you can't use constants as arguments to
thanks for your answer and explanations.