When I browse and pick a file and press save the code works fine. However if I manually type rubbish into the fileupload and press save nothing happens.How can I get the save button to work so that I can check what is in the fileupload is a proper and existing file?
i am uploading a file through file upload control , file size has greater then 4 MB, I have to give the proper alert msg to the user that file size exceeding the limit.how to do it , because at server side it is crashed on the IIS and not return to the server to check the file size validation.that how it is possible to validate the file size and give the proper alert messege
So my application is on a production and running smoothly with no bugs at all. yay! My question: Is there's more efficient way of updating an existing ASP.NET application? Here's what i'm currently doing ( dont laugh that's why im asking xD):
1. I compile the project, 2. after compilation i transfer the compiled files via ftp. then i delete the existing files on my folder and put the newer one.
I have a FileUpload control in an UpdatePanel and when user select a file, the full file path will will be stored in a hiddenfield, and during postback, i would like to assign the full file path in the hiddenfield back to the FileUpload control textbox, possible to achieve that?
if (dt.Rows[i]["Code"] == code) { Label lblLang = (Label)(((e.Item as GridItem).FindControl("lblLang") as Label)); lblLang.Visible = true; } else { } }
I am adding a new language Fr-FR in the code above. fr-FR already exists in my DB's Language Table. I do not want to add duplicate values in my table. There should be only one fr-FR.
I am able to upload a file to the server into a folder structure. but when I try to link to the file, the image path in the code is giving a strange url.
I am trying to use a stored procedure to insert new records from aspx page. I have created an stored procedure for that and it works fine but I want to display an error message when record exist. It does not display any error message however it does not insert when record exist. How can I display an error message when record exist flag in stored procedure -
I have one problem with my shopping cart that I really can't figure out all by myself.I want, if a item already exist in the datatable, the quantity to be updated for that item with the new number instead of creating the same item again.I have done a foreach loop because I think that is where I should start.Notes: MyRow[3] is the column holding the quantity.Code:
For our application we provide users with file downloads that utilize handlers to serve the files. Currently, the way it is served to the user is through window.location. When using this, at times, it causes issues under IE8. When an error occurs, it cannot be caught under the page that called it.
A) Is there a way to serve an ashx file handler to the user where the page that called it can catch any exceptions made from thje handler B) What is the correct way to serve the handler, eg. window.open, window.location, etc. Would return false at the end of the javascript solve this? Are there any other ways
I hv a file upload control which save files in folder upload_html. When I upload file of same name which already exists upload_html folder it does't replace that file.........
I want that file to be replaced from that folder.............
I am working on ASP.NET3.5 platform. I have used a file upload control and a asp button to upload a file. Whenever i try to upload a file which contain special characterlike (file#&%.txt) it show crash and give the messeage "Server Error in 'myapplication' Application." A potentially dangerous Request.Files value was detected from the client (filename="...New Text &#.txt"). Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Files value was detected from the client (filename="...New Text &#.txt"). Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. how can i prevent this crash using javascript at client side?
Is there a way to add a file upload progress bar to the existing .net file uploader? I have an uploader on my site that has all kinds of things tied to it that I can't change to use an AJAX uploader. Or as far as I know I can't. So I was wondering if anyone knew how to add the progress bar to the asp.net uploader.
I have a full working web site that i ported to a new hosting company. In some pages i have links to PDF on the server (they do exist!) On the old server no problem. On the new one when user clicks on the link : error 404 file does not exist.. Should i look in the web.config ? i don't know where to start
How can I retrieve file information (size of file) before it is uploaded to the webserver?
I would like to create a multi file upload. I have it working in JQuery but I would like to know the size of the files to set a limition by summing up the total the file sizes together.
I am planning to create a web page with the name of the student, course,pic and the resume to be uploaded by the user for specified students...
If I upload the resumes of students with same name how to differentiate. Looking for creating a name of the file name randomly as next I'm planning to retrieve the resume via search function to download and view the resumes....
Saving the resumes with same name with differentiate or randomly to save the files with new file name....
I would like ask you for some ideas how can I write mechanism that will be automatically read files from folder. I don't know how to schedule the write task. I want to check for new file everyday and if the new file is in the folder read it.