在动态文本框中仅允许使用数字和'f'字符 [英] allowing only numarics and 'f' charecter on dynamic text box

查看:84
本文介绍了在动态文本框中仅允许使用数字和'f'字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我创建了动态文本框.

我需要添加按键事件,并允许用户仅输入数字和字符"f".

我这样尝试过
txtmrks.Attributes.Add("keypress", "");

但是它不会在调试后运行.

拜托,有人帮我.

在此先感谢

Hi All,

I have created dynamic text boxes.

I need to add keypress event and allow user to enter only numbers and charecter ''f'' only.

I tried in this way like
txtmrks.Attributes.Add("keypress", "");

But it won''t run after debug.

Please, someone help me.

Thanks in advance

推荐答案

我想由Suthish提供的答案在这里 [ ^ ]可以为您提供帮助
I Think Answer given by Suthish HERE[^] can help you.


尝试将TextChanged事件添加到aspx文件中的元素.
Try adding a TextChanged event to your element in the aspx file.


您可以随时尝试MaskedEdit [
You can always try the MaskedEdit[^] extender from the ASP.NET AJAX Control Toolkit

Regards
Espen Harlinn


这篇关于在动态文本框中仅允许使用数字和'f'字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆