/*-+

  • Thread starter Thread starter DailyCoder
  • Start date Start date
D

DailyCoder

There are two ways:
1. Hook the keypress event and bypass the +/*-? chars
2. Hook the textchanged event and remove the +/*-? char from the text
of the text box.

________________________
(e-mail address removed)
http://www.dailycoding.com
DailyCoding.com - daily code for C#, .NET, ASP.NET, SQL
 
If ASP.NET and you can use AJAX, consider:
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/FilteredTextBox/FilteredTextBox.aspx

Otherwise, you will be using JavaScript.
http://www.codeproject.com/KB/custom-controls/TextBoxLimitedInput.aspx
http://www.dotnetspider.com/resources/17800-filter-textbox-with-javascript.aspx

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

********************************************
| Think outside the box! |
********************************************
 
Back
Top