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

Store Enum as Char with Dapper
Drag and Drop Windows Forms: Controls dissapear after dragging
What is the best way to count all instances of a single process running under a particular user logon?
C# Security Protocol Specification
Ajax Dropdownlist using cascading dropdownlist in asp.net
Adding textbox value with button in C#
How to show the tooltip without any time duration?
How can i hide in game view a ui button and show the button when pressing the escape key?
TCP Connection. best way to handle multiple connections [duplicate]
Send POST request with Image from Unity3D
How to make default Password Reset functionality work in ASP.NET Core
UriTemplate Matching Email
Error handling between web api and angular 2 client
Get Duplicates in List and Edit Item
Should I await a 'async Task' function if I don't care its return value? [duplicate]
Autofac open generics: factory IIndex based on <U>

Categories

HOME
asterisk
google-cloud-pubsub
typo3
pyspark
fortran
jenkins-pipeline
intellisense
ibm
c++builder
django-middleware
nltk
opc-ua
mingw
mailchimp
foreach
restheart
software-collections
wkhtmltopdf
phpexcel
websharper
derby
pylint
ringcentral
minimagick
cherrypy
fibonacci
quality-center
spring-data-gemfire
intermec
jmsserializerbundle
jsonapi-resources
mootools
wit-ai
cache-control
aweber
border-layout
perf
device-driver
libconfig
latency
aura-framework
jquery-ui-slider
html-entities
ocpjp
ionic2-select
spring-cloud-bus
dna-sequence
fluent-nhibernate-mapping
nservicebus6
reloaddata
nsalert
spring-cloud-aws
lightspeed
nls
qt3d
blitz3d
optional-parameters
particle-system
bytearray
transaction-isolation
clique
periodic-processing
jersey-test-framework
instabug
musicbrainz
roslyn-code-analysis
hexagonal-tiles
httpmodule
valdr-bean-validation
autopep8
esri-arc-engine
pysvn
cocos2d-x-2.x
fscanf
nspopupbutton
banana-pi
azure-caching
mongoid4
xcode5.1
myrrix
pechkin
pymel
dnsbl
algol
idoc
report-viewer2010
animationdrawable
towerjs
zend-validate
xpolog
service-layer
zipstream
xcdatamodel
chars
glassfish-embedded
helios

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