C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




file upload control


Posted Date: 09 Oct 2008      Total Responses: 5

Posted By: Santhosh       Member Level: Gold     Points: 1


Hi,
Iam having file upload control in my asp.net page. if uploading file name contains below values means i want to reject in client side how to do that one?

/? : & * " < > | # %




Responses

Author: Vivek    09 Oct 2008Member Level: GoldRating:     Points: 2
Check presence of these special chars either clientside or at Server side....

At ClientSide Call your JavaScript Function on Click of Upload.


Author: Palanivel    09 Oct 2008Member Level: SilverRating:     Points: 4
Hi

You cant assign value to File Upload Control, so you take the value of FIle Upload control,replace special character then place the resultant value into hidden field. in code behide use the Hidden Field Value. This is the very simplest way to perform.



Author: D.Jeya kumar(JK)    09 Oct 2008Member Level: DiamondRating:     Points: 3
Hi,

Check the chars values on click of the button of the file upload control

do some thing like this

var reply = new RegExp(/\$|\/|\^|-/, "g");
specialchars = mytextarea.innerHTML.match(re);

Regards
JK


Author: @@@ Hyderabadi Biryani @@@    09 Oct 2008Member Level: DiamondRating:     Points: 3
Hi
I would like to go with JK answer, Simple replace the file and inform the new filename to the user and for this Regular expression is the right choice.

Thanks -- Vj
http://dotnetvj.blogspot.com
http://oravj.blogspot.com




Author: anantha kumar    09 Oct 2008Member Level: BronzeRating:     Points: 1
var reply = new RegExp(/\$|\/|\^|-/, "g");
specialchars = mytextarea.innerHTML.match(re);


Post Reply
You must Sign In to post a response.
Next : Drop down Menu
Previous : cross_obj.style is null or not an object
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

audio conferencing services

Contact Us    Privacy Policy    Terms Of Use