用户输入值时如何从文本框中填充消息框? [英] How to populate message box from a text box when user enters a value?

查看:66
本文介绍了用户输入值时如何从文本框中填充消息框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用3个文本框进行范围选择.当用户在文本框中输入范围时,我想在消息框中显示范围值.

假设用户在第一个文本框中输入1)100,我想显示您被选中了< 100".

2)第一个文本框为100,第二个文本框为500,我想显示您被选中为101-500"
3)500 in 2nd text box and 1000 in 3rd text box我想显示您被选中501-1000"
在第三个文本框中输入一个值后,我想在消息框中显示所有范围.

我该怎么办?

问候,

SJ

Hi All,

I am using 3 text boxes for range selections. I want to show range value in a message box when user enters range in text box.

Suppose user enters 1)100 in 1st text box , I want to show "you are selected <100".

2)100 in 1st text box and 500 in 2nd text box I want to show "you are selected 101 - 500 "
3) 500 in 2nd text box and 1000 in 3rd text box I want to show "you are selected 501 - 1000 "
After entering a value in 3rd text box ,I want to show all ranges in message box.

How can I do this?

Regards,

SJ

推荐答案

您可以将文本框onchanged事件与javascript一起使用.请查看此链接
点击
You can use textbox onchanged event with javascript. Please, see this link
Click


错误的问题!

请阅读System.Windows.Forms.TextBoxSystem.Windows.Forms.Button上的帮助.使用int.Parse和/或int.TryParseText中获取整数,object.ToString执行相反的操作.它应该绰绰有余.甚至这也有太多帮助(对不起,我!).做一些基本的工作!

如果没有帮助,请发布失败的代码,但最好不要发布.您想学习还是愚弄老师?您决定.

—SA
Bad question!

Please read the help on System.Windows.Forms.TextBox, System.Windows.Forms.Button. Use int.Parse and/or int.TryParse to get integer from Text, object.ToString to do the opposite. It should be more than enough. Even this is too much help (silly me!). Do some elementary job!

If it did not help, post your failed code, but better not. Do you want to learn something or fool rather your teachers? You decide.

—SA


这篇关于用户输入值时如何从文本框中填充消息框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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