use a hidden field to submit client side value to server
.aspx Code
--------------
<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*=hndtxt_email]").val($("[id*=txt_email]").val());
$("[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" />
<asp:hiddenfield id="hndtxt_email" runat="server" />
.cs Code
--------------
protected void but_send_Click(object sender, EventArgs e)
{
string email = hndtxt_email.Value;
}