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

Main thread freezes when waiting for Web service synchronously in Windows Phone Silverlight Application 8/8.1
ASP .NET GridView not displaying rows
SQL stored procedure not returning all SELECT statements
C# Calculate the image scroll with scrollbar
stream audio and video data separately
Azure Active Directory Authentication with Azure Mobile Services Failed
Xamarin Parse Component refresh current user
How to use Automapper to map an object to an interface at a different level?
ASP.Net C# equivalent to Coldfusion cfoutput GROUP
HtmlAgilityPack convert XPath query to LINQ
How to assign System.Drawing.Color to Microsoft.Office.Interop.Excel.ColorFormat
Construct a list of wpf Hyperlink elements from an XML source file using Linq
Exception while using Regex with richtextbox in C#
Is there is a way to generate “simple” url with #Url.Action?
How to get the cell index of textbox in my gridview
C# selenium max sessions

Categories

HOME
youtube-api
msbuild
kendo-ui-angular2
typo3
azure-resource-manager
comments
flowtype
travis-ci-cli
gnuradio
kendo-asp.net-mvc
cracking
phpexcel
coding-style
angular-universal
logstash-configuration
google-closure-compiler
md2
project-reactor
printf
aiml
react-jsx
policy
continuous-fourier
symlink
jopendocument
large-files
xlib
deferred
overflow
language-detection
gitosis
incapsula
powerbi-embedded
headphones
maven-2
lighting
observer-pattern
ssdp
google-cloud-powershell
contenteditable
irr
web-technologies
firefox-developer-edition
servicebus
fluent-nhibernate-mapping
sp
timex
sharing
gevent
dimensionality-reduction
eclipse-mars
cosign-api
transaction-isolation
database-administration
datamodel
ewam
github-for-mac
database-project
adempiere
hexagonal-tiles
dcg
ultraedit
apache-pivot
famous-engine
livescript
visual-c#-express-2010
amzi-prolog
code-complete
nsnumber
violation
mosix
symbian3
coinbase-php
brew
biztalk-deployment
boost.build
urlfetch
inflate
esi
motordriver
states
bash4
datasheet
mcpd
sessiontracking
designated-initializer
quazip
netbeans7.0

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