javascript - Opening Popup From Server Side -


I am adding a check to verify the size of the imported file in my web application. If the file size is greater than 4 MB, then I need to show a confirmation pop, even if a user wants to upload the file. If the user chooses a yes then the default functionality occurs and the upload is canceled.

I am trying to open a confirmation page

  Page.ClientScript.RegisterStartupScript (typeof (nudocument), "valuedatefile size", "& lt; script & gt; ; Valid file size () & lt; / scripts & gt; ");  

Where valid file size () is a JavaScript function that shows the confirmation box.

But the problem is that, control of the page before I use the hidden variable to set the result of the confirmation and use it in the ' if-else ' condition. So the server side moves forward. Therefore, I am unable to read the values ​​of hidden variables and leave the uploading code on the server side. I'm using the concept of hidden variables in the form of javascript element.files.size in IE8 does not work.

Can someone suggest a better approach or solution, or is the only solution using the .aspx page as a popup?

Before all my questions are not clear, I hope to check the file size on the client side . But you indicate how you can open popups in javascript.

Either way, when it comes to your question,

Once the control goes to the server side then the upload will be uploaded file

below There are some URLs for reference.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -