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

Visual Studio cannot find referenced Assemblies after starting with Admin privileges
When using Interaction Triggers in WPF to raise MouseDoubleClick, how do I determine which Control was clicked?
Preserve whitespace-only element content when deserializing XML using XmlSerializer
How to properly install the “Microsoft Speech” SDK
Optimized C# Code. Want to use better technique without nested loops
Is it possible to have a generic WCF service for handling multiple MSMQ endpoints?
“Cannot fall through” Switch Error
Create a custom user collection of collections
C# FormatException error [duplicate]
What's the most efficient way to implement a simple ORM framework?
Unity collision gameObject not disappearing
MSBuildWorkspace.Create on mono throws ReflectionTypeLoadException
ASP.Net 5 vNext Middleware for modular websites
Detect binding error on a custom wpf textbox
Creating a new spreadsheet in google docs
How can we deploy finger print reader to C# web application?

Categories

HOME
postgresql
gcc
azure-eventhub
phantomjs
reference
azure-database-mysql
assign
sms
terminal
mediarecorder
checkpoint
opacity
samsung-gear-s2
websharper
hdf5
mbed
browsermob
jinja2
lambda-calculus
github-flavored-markdown
console-application
nsoperation
orange
formulas
pumping-lemma
scrapy-spider
knapsack-problem
orgchart
adobe-captivate
sphinx4
ocl
andengine
foxpro
slim-lang
android-scrollview
jsonapi-resources
sampling
hippocms
instances
azure-web-roles
delphi-xe
taiga
python-venv
google-chrome-storage
flask-socketio
skype-bots
vertex
fluent-nhibernate-mapping
disassembly
wicketstuff
pyautogui
catalyst
class-design
recurring
change-password
nimbus
hana-sql-script
ooad
dynamics-nav-2013
kramdown
newlib
jts
lytro
om
exchange-server-2007
first-order-logic
nmock
firewire
tidesdk
launcher
frisby.js
growl
xts
pidgin
logo-lang
xml-validation
ardor3d
xcode5.1
octokit
qgraphicsscene
mosix
select2-rails
pudb
junction-table
gmail-imap
vline
idoc
winrt-async
inserthtml
s60
text-manipulation
google-local-search
rpxnow
cross-cutting-concerns

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App