C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

reset a fileupload


Posted Date: 14 Jul 2006      Posted By: Jes M George      Member Level: Bronze     Points: 2   Responses: 3



how to reset the fileupload using javascript




Responses

Author: Bharat    14 Jul 2006Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

Hello You could use the HTML input button whose type is of reset


Author: Jes M George    17 Jul 2006Member Level: BronzeRating: 2 out of 52 out of 5     Points: 2

i want to reset only the fileupload not the entire form. if i use the html reset button it will reset the entire form.


Author: Er. Ram Singh    03 Mar 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

string filename = UPLOAD_STORE_IMAGE.PostedFile.FileName;

string filespecified = filename.Substring(filename.LastIndexOf("\\") + 1);
string filepath = "~/Medical_Store/UploadImage" + "/" + filespecified;
string imageurl = filename.Substring(filename.LastIndexOf("."));
imageurl = imageurl.ToLower();
string imgtype = UPLOAD_STORE_IMAGE.PostedFile.ContentType;
int imglength = (int)UPLOAD_STORE_IMAGE.PostedFile.ContentLength;
if ((imageurl != ".jpg") && (imageurl != ".gif") && (imageurl != ".bmp") && (imageurl != "jpg") && (imageurl != "gif") && (imageurl != "bmp"))
{
Response.Write("this file format is not supported");

}



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : assigning a value to label from javascript
Previous : how can i browser X button closed.
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use