Click here to Skip to main content
14,734,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to pass negative number in the action but in the address bar i do not want negative number to display.
This negative number is value for an enum.

What I have tried:

Currently I am passing negative int value of enum
Updated 18-Feb-19 6:56am
F-ES Sitecore 18-Feb-19 9:32am
If you don't want the data to appear on the url then you'll need to use a POST, but that means you won't be able to link direct to your page.
Karthik_Mahalingam 18-Feb-19 23:48pm
show your enum definition

1 solution

I think you have design issues, and should get rid of the "negative" enums. Refactor if necessary.

There is no advantage to negative enums. The only "standard" I would expect would be a default of "0" for "Unknown" or "Default".

The fact you have to even think about how to handle it shows it's a design error (from the norm).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900