c# - Should I always call Page.IsValid? -


I know that never user input is trusted, because undesirable input can compromise the integrity of the application in some way It may be accidental or deliberate; However, there is also a case for calling on the page. IISValid Whenever there are no verification controls on the page (again, I know its wrong procedure to trust user input except for verification)? Does Page.Ivalid display any other type of validity? I looked at MSDN, and the docs indicate that the page ISIILID is only effective if the page has validation controls, or pages. Validity method has been called. A friend of mine suggested that I check the page every time I click the button handlers. Even if there is no validity control or a clear page. Validity call.

I would be the first to tell you that" All input is bad until other input is proved. "However, in this case, I think your friend is wrong because in his argument we can possibly come up with one hundred other qualities which should be checked or set, although the mistake is OK.

Checking If you have a "due validity" scenario - only one is understood - a button that submits the form, its due validity property is set to true. Automatically call page validity and same MA All assumptions regarding the validation group will be checked for validity.

Edit:

Use only the reflector to check it Done and the function is always right if the page does not have a valuer (validation is zero selection).


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -