473,402 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

validations and displaying alerts

2
How do i validate texbox for length,numeric & alphanumeric in .net 2003 .

for numeric validations i am using a Range Validator.If the entered value is not valid then i need to display a mesage box asking to enter numeric data. .In windows we have Messagebox.show method But how do I do this in asp.net
Mar 22 '08 #1
2 913
Frinavale
9,735 Expert Mod 8TB
How do i validate texbox for length,numeric & alphanumeric in .net 2003 .

for numeric validations i am using a Range Validator.If the entered value is not valid then i need to display a mesage box asking to enter numeric data. .In windows we have Messagebox.show method But how do I do this in asp.net
You have to use a JavaScript call:
Expand|Select|Wrap|Line Numbers
  1. alert('You have not entered valid data');
  2.  
The above line of code will display an alert message box with an "Ok" button.

-Frinny
Mar 22 '08 #2
malav123
217 100+
Ya Deffinately Java Script is the best way for client side validation...
You shoud have to use Java script for all the validations...
You can put validation on Button click like,
Btn.Attributes.Add("onClick", "return function1(this.form)")
and write function in javascript according to your requirement like,
function function1()
{
alert("please enter number");
}
Mar 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ryan baldwin | last post by:
Hi, I posted this in the GotDotNet .NET Alerts forum, but that was 3 days ago and still no reply so I'll try my luck here. My apologies if there's a better group to post this question in, but at...
1
by: DotNetJunkies User | last post by:
I successfully implemented this poup calendar control in C#. But the problem I am having is that the button click is posting back and the validator is getting fired which is asking all the required...
12
by: korund | last post by:
How to make javascript alert with non-english text displaying correctly on computers where english only is default system & language settings? For web page the solution is just use meta tags:...
7
by: swethasivaram | last post by:
Hello I have a Java-based web application whose interface can be in multiple languages. My requirement is that the javascript alerts that I display should be displayed in the language in which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.