protected void Page_Load(object sender, EventArgs e) { if (IsPostBack ==true && Page.Request["__EVENTTARGET"] == "SendReply") { SendReply(); } ..... } private void SendReply() { //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "KeyToIdentifythisScript", "#dialog_link().click();", true); string username = Membership.GetUser ().ToString (); if (ViewState["username"]!=null ) { body = body.Replace("<%Body%>", txtreply.Text.ToString());// here im getting the text as null ..... }
$('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Send Mail": function () { __doPostBack('SendReply', '') // $(this).dialog("close"); }, "Cancel": function () { $(this).dialog("close"); } } ..... <table class="ui-accordion"> <tr> <td> <p><a href="#" id="dialog_link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Contact Information</a></p> <!-- ui-dialog --> <div id="dialog" title="Contact Information"> <table> <tr> <td>Phone Number :</td> <td><asp:Label ID="lblContact" runat="server" /></td> </tr> <tr> <td>Reply By Email :</td> <td> <asp:TextBox ID="txtReply" TextMode="MultiLine" runat="server" ></asp:TextBox> </td> </tr> </table>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)