Link to home
Create AccountLog in
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
Avatar of bedanand
bedanand
Flag of Nepal image

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.


Avatar of sybe
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
Avatar of CB_Thirumalai
CB_Thirumalai
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of mannevenu

ASKER

Yaa its working fine now