Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting Attributes.Add onkeypress to work on Mozilla Firefox
Message
From
21/04/2008 22:20:42
 
 
To
All
General information
Forum:
ASP.NET
Category:
Web forms
Title:
Getting Attributes.Add onkeypress to work on Mozilla Firefox
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312286
Message ID:
01312286
Views:
87
I am using this code to add an onkeypress attribute to a textbox control on a form:
        loControlTextboxUsername.Attributes.Add("onkeypress", "return FormLoginFromInput(event)")
However, on Mozilla Firefox, the attribute does not get added. So, this means .NET is smart enough to detect the browser and ignore that line. Or, is there something I am missing?

And, if that is the case, then, what kind of approach should I use to make sure this will be added on all browsers or how to have it compliant with all browsers?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform