You are implementing a Web page that allows users to upload files to a Web server.
The page includes a form that has a Submit button.
You want to restrict uploads so that only files smaller than 1 MB can be uploaded.
What should you do?
A.
Add an HTML input type=”file” control.
Add an onSubmit handler to the form to check the file size and cancel the form submission if the file size is
too large.
B.
Add an HTML input type=”file” control.
Add an onChange handler to the input control to check the file size and cancel the upload if the file size is
too large.
C.
Add an ASP.NET FileUpload control and configure it to run on the server.
Add a server-side OnClick handler to the form’s Submit button to save the file only if the file size is allowed
D.
Add an ASP.NET FileUpload control and configure it to run on the server.
Add a server-side OnDataBinding handler that saves the file only if the file size is allowed.