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

Access static variable in session [Non Static]
Objective c API to use in Unity3d (retaining the object-orientation)
Get own property name from parent class using reflection
Using the correct “.resx” file according to the culture info
LINQ GroupBy using anonymous types working better than it should
Select ListView item when combobox/textbox is selected WPF MVVM
Why interlocked is so slow
Datetimepicker block earlier date
Structuremap and generics for open generic type [closed]
Mapped c++ struct to c# struct
wpf webview html page splitter
ContextMenu for ListViewItem only
Information appears when mouse pass [closed]
How to solve Dataset Error - DataSet doesn't support 'union' or 'list' as simpleType
ObservableCollection dependency property not updating when add is called
C# reload iframe content from inside

Categories

HOME
http
indexing
kendo-ui
macros
ide
sip
pyspark
redhawksdr
snmp
css-selectors
gnuradio
liquidsoap
rethinkdb
restheart
yacc
token
core-data
cakephp-2.0
lambda-calculus
nsoperation
ampscript
android-wifi
cherrypy
devexpress-mvc
functional-dependencies
ithit-webdav-server
sha
pixels
rancher
inspec
windows-mobile
resx
typeclass
hierarchy
ios9
exacttarget
loopback
flickr
openvms
bootcamp
gstreamer-1.0
kepserverex
rtsp
stdin
instances
byobu
gem-fury
definition
htop
sharpssh
dynatable
distcc
ldd
visual-web-developer
angularfire
supervised-learning
jde
archiva
jmh
cexception
videoview
app-data
gtkwave
kramdown
roslyn-code-analysis
shunting-yard
dojox.grid
information-hiding
report-builder2.0
illegalargumentexception
mind-manager
xmlserializer
xts
episerver-7
smartxls
code-smell
new-operator
kendo-window
octokit
zend-db-table
mandelbrot
codeigniter-form-helper
moonscript
netzke
big-endian
sup
parsec
joomla1.7
rjs
datarelation
table-valued-parameters
morfik
djangoappengine
jettison

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile