asp.net - Results of Request.Form if the requested input is blank -


When I use Request.Form ("myInput") and input field "myInput" is empty, Get the error.

How can I handle it?

Is there a way to check that "myInput" has not been filled up?

Reading from the request.form is not the reason for the archive exception, neither The value is an emptry string (which occurs when the input field is empty) nor the field is also present.

If the input field is empty, then you get an empty string when reading from the archive, so to verify that you check that the length property of the string is zero.

If the input field is not present, then you get an empty reference ( nothing in VB) from the archive, so that you can see the zero To compare the reference (can not use nothing in VB).

You can do us both to check the String.IsNullOrEmpty method.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -