Avatar of brgdotnet
brgdotnetFlag for United States of America

asked on 

How to validate a drop down listbox selected value. How to prevent it from being hacked.

I have an Asp.net web form with several drop down listboxes on it. None of the list boxes are required values when the form is submitted. In other words they are optional values. Is there a way that I can prevent the listbox values from being tampered with or hacked? So when the application user presses the submit button, I need to somehow validate that the value selected has not been tampered with.

I could save all of the drop down list values in a list, and then when the form is submitted compare the selected value with values in the list to make sure the selected value is in the list. This seems like an extreme manner of having to ensure that the drop down value has not been hacked. However I can't think of any other way. Since the drop down listbox values are optional, I can not use a required field validator control to validate the drop down list selected value.
ASP.NET

Avatar of undefined
Last Comment
brgdotnet
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of brgdotnet
brgdotnet
Flag of United States of America image

ASKER

Well if client side can be most easily tampered with, then server side is best. But if I have to save all of the drop down data in a list in order to validate it later, then that seems like a rather unnecessary tasks, taking up more system resources. So probably the question should be looked at in terms of "How do I prevent client side drop down data from being hacked".
Avatar of brgdotnet
brgdotnet
Flag of United States of America image

ASKER

THanks Mr. Chong
ASP.NET
ASP.NET

The successor to Active Server Pages, ASP.NET websites utilize the .NET framework to produce dynamic, data and content-driven web applications and services. ASP.NET code can be written using any .NET supported language. As of 2009, ASP.NET can also apply the Model-View-Controller (MVC) pattern to web applications

128K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo