访问jquery弹出窗口中的文本框文本值到页面后面的代码 [英] access textbox text value in jquery popup to code behind page
问题描述
我正在使用模式弹出窗口,其中我有一个文本框,单击发送按钮它正在执行代码隐藏功能但不获取文本框值。 I am using modal popup in which i have one textbox, On click on send button it is executing the code behind functionality but not fetching textbox value. 这篇关于访问jquery弹出窗口中的文本框文本值到页面后面的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
< pre lang =Javascript>< link type = text / css rel = stylesheet href = http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css />
< script type = text / javascript src = http://code.jquery.com/jquery-1.8.2.js>< / script>
< script type = text / javascript src = http://code.jquery.com/ui/1.10.3/jquery-ui.js>< /脚本>
< script type = text / javascript>
$( function (){
$(' #btnclick')。click( function (){
$( #popupdiv)。dialog({
title: 将详细信息发送到电子邮件地址,
宽度: 400 ,
height: 200 ,
modal: true ,
按钮:{
发送: function (){
$( [id * = but_send])。click();
},
关闭: function (){
$( this )。dialog(' close'跨度>);
}
}
});
});
})
< / script>
< div id = popupdiv title = 基本模态对话框 style = display:无 >
输入电子邮件地址
< asp:TextBox ID = txt_email runat = server class = textcss > < / asp:TextBox >
< asp:标签 ID = lbl_status runat = server CssClass = red 文字 = > < / asp:标签 >
< / div >
< asp:按钮 ID = but_send runat = server 文本 = 发送 样式 = display:none OnClientClick = return sendvalidate(); onclick = but_send_Click / >
protected void but_send_Click( object sender,EventArgs e)
{
string email = txt_email.Text;
} ( function (){
(' #btnclick')。click( function (){
( #popupdiv)。dialog({
title: 将详细信息发送到电子邮件地址 ,
宽度: 400 ,
height: 200 ,
模态: true ,
按钮:{
发送:功能( ){
<link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
$(function () {
$('#btnclick').click(function () {
$("#popupdiv").dialog({
title: "Send details to email address",
width: 400,
height: 200,
modal: true,
buttons: {
Send: function () {
$("[id*=but_send]").click();
},
Close: function () {
$(this).dialog('close');
}
}
});
});
})
</script>
<div id="popupdiv" title="Basic modal dialog" style="display: none">
Enter email address
<asp:TextBox ID="txt_email" runat="server" class="textcss" ></asp:TextBox>
<asp:Label ID="lbl_status" runat="server" CssClass="red" Text=""></asp:Label>
</div>
<asp:Button ID="but_send" runat="server" Text="Send" style = "display:none" OnClientClick="return sendvalidate();" onclick="but_send_Click" />
protected void but_send_Click(object sender, EventArgs e)
{
string email = txt_email.Text;
}
(function () {
('#btnclick').click(function () {
("#popupdiv").dialog({
title: "Send details to email address",
width: 400,
height: 200,
modal: true,
buttons: {
Send: function () {