c#


RegularExpressionValidator for an HTML input button?


In my ASPX pages, I find the asp:RegularExpressionValidator extremely comfortable. I use it to prevent form submissions, but could it also be used to prevent Javascript functions run by HTML controls like <input type='button'> which do not cause postback?
Example:
<input runat="server" type="text" id="txtName" />
<asp:RegularExpressionValidator ID="fooValidator" ControlToValidate="txtName" runat="server" ErrorMessage="Please enter you name" ValidationExpression="^[\s\S]{3,}$" /><br />
<input runat="server" id="fooBtn" type="button" value="Continue" onclick="foo();" />
Could I prevent the fooBtn click using the above fooValidator which validates a simple HTML text input?

Related Links

Parent-Child Matrix Chaining/Order Hierarchy
Invoke a non generic method with generic arguments defined in a generic class
Display ticket remaining time
Can't call Click Event on dynamic button
OdbcConnection.GetSchema(“TABLES”); not working
How to filter data in RDLC report?
defining characters to ignore while matching strings C# [closed]
How do I get the network interface and its right IPv4 address?
How can I delete a directory in a Zip file using .NET?
receiving string from c# to Java mistakes
No endpoint listening wcf/rest
How to add NT AUTHORITY\IUSR to Administrators group
Combobox in Syncfusion XlsIO
Creating a Strong Name dynamically, without Sn.exe
Why is my locally declared variable not being recognized in the finally block?
Comparing two different types with Entity Framework

Categories

HOME
redux
itunesconnect
arcgis
mifare
spss
azure-resource-manager
multipartform-data
kendo-asp.net-mvc
pdf-generation
samsung-gear-s2
annyang
soap-client
oms
angular-universal
ng2-charts
android-notifications
template10
aws-devicefarm
conditional-formatting
ppp
akavache
adobe-captivate
setup-project
uibarbuttonitem
meteor-accounts
r-factor
paper-trail-gem
selenium3
keil
qt-designer
webmock
flex3
motherboard
azure-storage-files
extern
file-conversion
quartz
risc
openidm
extjs3
openpgp.js
nsalert
chain
pyautogui
catalyst
msiexec
recursive-query
easy-thumbnails
qudpsocket
blackberry-webworks
computed-properties
init
recurring
kik
google-app-engine-php
play-json
cakephp-2.6
glog
accpac
numerical-recipes
unityvs
diffmerge
conditional-comments
xts
reactjs-native
git-subtree
grunt-wiredep
nokogiri
forward-declaration
stringstream
azure-scheduler
msbuild-task
rfc822
custom-cursor
google-email-audit-api
mismatch
sessiontracking
response-time
hp-trim
cstring
office-2003
asp.net-1.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App