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

Can File.Copy copy from a volume to a different volume?
Implementing a generic unmanaged array in C#
IE9 aborting, then re-requesting script
Index (zero based) must be greater than or equal to zero
Are there any good hierarchial controls for web sites?
Can someone explain this example of Windows OS version numbering?
Using MS Word Templates to allow a user to fill out a report
Generating expression tree for a subproperty test
High memory usage for small application
What is the best way to get the level from a tree data structure using LINQ?
Write reference to xsd/schema in output from XElement.Save()
C# - R interface
Entity Framework: Avoiding Inserting Duplicates
What's the difference between enums & using static classes with constants?
Binding doesn't work but also doesn't give any errors
Is it possible to recover corrupted Zlib data beyond the corrupted section?

Categories

HOME
pact
spring-boot
javafx
teradata
intellij-idea
jenkins-pipeline
file-upload
postsharp
x86-64
overrides
google-docs-api
kohana
phpexcel
mongoimport
wowza
osclass
jinja2
web-worker
bookmarklet
google-calendar-api3
aiml
summernote
keystone
jq
procedural-generation
waterfall
android-xml
priority-queue
request-uri
pypy
sphinx4
multilanguage
urhosharp
wercker
visual-prolog
apache-falcon
motion
armadillo
fisheye
sknode
wicket-tester
ape-phylo
web-technologies
superclass
text-extraction
grails-2.0
piranha-cms
jks
geminabox
vertex
sharpdevelop
zedgraph
rmq
disassembly
easy-thumbnails
scikit-image
papyrus
symantec
csc
nsoperationqueue
django-taggit
mrunit
ideavim
code-translation
sqldataadapter
wonderware
nonblocking
event-tracking
taverna
biginsights
roslyn-code-analysis
callfire
grails-3.0.9
system.diagnostics
radgrid
copy-on-write
mri
numerical-recipes
douglas-peucker
static-files
method-overloading
aiff
fedena
api-eveonline
pnunit
lettuce
starling-framework
nop
facebook-likebox
aspnet-compiler
violation
report-viewer2010
derived-class
aspmenu-control
erlide
wxperl
automapper-2
isgl3d
file-processing
fxcopcmd
chars
browser-state
konsole
web-widget
zend-acl

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile