本文介绍了如何使用文本框在ASP.NET中显示警报的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在asp.net中显示警告,警告文本应该来自textbox1
I would like to show an alert in asp.net and the alert text should be from textbox1
<div id="myAlert" class="alert alert-danger collapse" >
<a id="linkClose" href="#" class="close">×</a>
Fixed Text is here
</div>
此代码将在按钮点击时执行,我需要显示 Textbox1的文本代替固定文字在这里
再次澄清:我需要将Textbox1值传递给asp.net代码
我尝试过:
我从谷歌那里得到了这个,但是在尝试多次后仍然不知道如何实现
This code will execute on button click, I need to show text of Textbox1 in the place of Fixed Text is here
Again for Clarification : I need to Pass Textbox1 value to the asp.net code
What I have tried:
I got this from google ,But still no idea how to implement after trying many times
function AlertText() {
alert($("#TextBox1").val()); <!-- goal: to display the text from Textbox1. -->
}
任何帮助都将受到高度赞赏
Any Help would be highly appreciated
推荐答案
任何帮助都将受到高度赞赏
Any Help would be highly appreciated
这篇关于如何使用文本框在ASP.NET中显示警报的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!