紧急(在文本框中输入的值应在标签中显示b) [英] Urgent(values entered in textbox should b displayed in label)

查看:76
本文介绍了紧急(在文本框中输入的值应在标签中显示b)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在aspx页面中有一个文本框",标签"和按钮".如果我在文本框中输入了一些值,则tat值应在标签中显示b ...并且再次在同一文本框中输入一些值,tat值应在不干扰第一个值的情况下显示b,依此类推.非常紧急,请帮助我..............

Iam having a "TextBox" a "Label" and a "Button" in my aspx page. If i enter some values into the textbox,then tat values should b displayed in the label...and agaig i enter some values in the same text box,tat values should b displayed without disturbing the first value and so on....very urgent Help me please..............

推荐答案

尝试lbl.Caption += textbox.Text;


Abhinav建议的是一种服务器端方式,该方式需要回发才能生效.

我建议您继续使用Javascript.使用文本框onchangeonblurr事件.将它们附加到JS方法.在JS方法中,获取文本框的值并将其分配给所需的标签.

试试吧!
What Abhinav suggested is a server side way that would need a postback to take affect.

I would suggest you to go ahead with Javascript. Use textbox onchange or onblurr event. Attach them to a JS method. In the JS method, get the value of textbox and assign that to the desired label.

Try!


这篇关于紧急(在文本框中输入的值应在标签中显示b)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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