Avatar of mannevenu
mannevenu
 asked on

FileUpload tabindexing

I am restricting text to be entered in the FileUpload control using
FileUpload1.Attributes.Add("onkeydown", "return false;")
but TabIndexing is not working
when the focus is on FileUpload and when I click tab, it is not going to next control.
Please help
ASP.NET

Avatar of undefined
Last Comment
mannevenu

8/22/2022 - Mon
bedanand

FileUpload1.Attributes.Add("onkeydown", "return false;")

Instead of just returning false, call the javascript  which then conditionaly returns false only then u r pressing key other than tab key.


sybe

That makes sense. Clicking on the tab is a 'keydown' event. Your code says to ignore any keydown event.

Why should you restrict typing in a fileupload field? People can still paste anything with their mouse into the field if they want. Not that it would matter, because what can go wrong?
ASKER CERTIFIED SOLUTION
CB_Thirumalai

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mannevenu

ASKER
Yaa its working fine now
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck