Problem with file uploader
How to prevent user from entering the character in a file uploader control
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
LalChand8 reputationPosted Jan 1, 2010, 11:16 PM EST
fuFile.Attributes.Add("onkeypress", "return false;");
fuFile.Attributes.Add("onkeyup", "return false;");
fuFile.Attributes.Add("onpaste", "return false;");
Kirtan PatelRank #292 · 8.6K reputationPosted Jan 2, 2010, 1:47 AM EST
Each Line Add Attribute to FileUpload Control ... so at each event like keypress etc java script prevent user to enter any thing ..in file upload :)