---
title: "on button click , sending feedback GUI module as a pop-up window and on click of submit adding to database using jquery dialog method"  
description: "on button click , sending feedback GUI module as a pop-up window and on click of submit adding to database using jquery dialog method"  
author: "Rashmi S"  
published: 2014-12-05  
updated: 2014-12-05  
canonical: https://www.mindstick.com/forum/12743/on-button-click-sending-feedback-gui-module-as-a-pop-up-window-and-on-click-of-submit-adding-to-database-using-jquery-dialog-method  
category: ".net"  
tags: ["jquery plugins"]  
reading_time: 6 minutes  

---

# on button click , sending feedback GUI module as a pop-up window and on click of submit adding to database using jquery dialog method

hi...This is Rashmi.. i'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to create a pop-up [window](https://www.mindstick.com/forum/161285/how-does-the-window-console-object-work-in-javascript) for sending [feedback](https://www.mindstick.com/articles/12731/the-importance-of-feedback-to-the-user-experience). i have used asp [button control](https://www.mindstick.com/forum/148/problem-in-assign-css-on-button-control-by-javascript) to [insert](https://www.mindstick.com/blog/173/executing-insert-delete-or-update-query-in-sqlserver-using-ado-dot-net) feedback details to database. I'm getting pop-up window not [button event](https://www.mindstick.com/forum/12660/button-event-handler-not-working) is not [getting triggered](https://www.mindstick.com/forum/12701/grid-view-event-not-getting-triggered). Plz help me..\
**This is my code:**

```
<link href='http://fonts.googleapis.com/css?family=Montserrat+Alternates' rel='stylesheet' type='text/css'> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>    <script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>    <link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css"        rel="stylesheet" type="text/css" />$(document).ready(function () {        $("[id*=btnPopup]").click(function () {            $("#modal_dialog").dialog({                title: "POST FEEDBACK",                width: "600",                buttons:                {                    Send: function (type, data) { $(this).parent().appendTo($("form:first")); },                close: function (type, data) { ($(this).parent().replaceWith("")); }                },                modal: true            });            return false;        });    });<li><asp:LinkButton ID="btnPopup" runat="server" Text="Feedback">Feedback</asp:LinkButton></li><div id="modal_dialog" style="display: none;width:auto;">                                 <table style="width:100%;">        <tr>            <td align="center">                <strong style="font-size: medium">FEEDBACK</strong></td>        </tr>        <tr>            <td style="height: 30px">                <hr size="3" color="#DA6BB6"/></td>        </tr>        <tr>            <td>                            <table style="width:100%;">                    <tr>                        <td style="width: 117px; font-size: medium; color: #800000;" bgcolor="#F8DDBA">                            Name</td>                        <td>                            <asp:TextBox ID="txtName" runat="server" Width="350px"></asp:TextBox>                        </td>                        <td>                            &nbsp;</td>                    </tr>                    <tr>                        <td style="width: 117px; font-size: medium; color: #800000;" bgcolor="#F8DDBA">                            Email ID</td>                        <td>                            <asp:TextBox ID="txtEmailId" runat="server" Width="350px"></asp:TextBox>                        </td>                        <td>                            &nbsp;</td>                    </tr>                    <tr>                        <td style="width: 117px; font-size: medium; color: #800000;" bgcolor="#F8DDBA">                            Contact Number</td>                        <td>                            <asp:TextBox ID="txtContactNo" runat="server" Width="350px"></asp:TextBox>                        </td>                        <td>                            &nbsp;</td>                    </tr>                    <tr>                        <td style="width: 117px; font-size: medium; color: #800000;" bgcolor="#F8DDBA"                             valign="top">                            Feedback</td>                        <td>                            <asp:TextBox ID="txtFeedback" runat="server" Rows="8" TextMode="MultiLine"                                 Width="350px"></asp:TextBox>                        </td>                        <td>                            &nbsp;</td>                    </tr>                    <tr>                        <td style="width: 117px; font-size: medium; color: #800000;" bgcolor="#F8DDBA">                            &nbsp;</td>                        <td>                            &nbsp;<asp:Button ID="Button1" runat="server" style = "display:none" OnClick = "Button1_Click"                                 Text="Post"  />                        </td>                        <td>                            &nbsp;</td>                    </tr>                </table>                        </td>        </tr>        <tr>            <td>                            &nbsp;</td>        </tr></table>  </div>
```

\
**[C# code](https://www.mindstick.com/forum/403/how-to-export-data-in-excel-file-from-sql-server-using-c-sharp-code):**\

```
protected void Button1_Click(object sender, EventArgs e)        {            if (b.Feedback_Add(txtName.Text, txtEmailId.Text, txtContactNo.Text, txtFeedback.Text, DateTime.Now.ToShortDateString()) == 1)                Response.Write("<script>alert('Feedback sent successfully.')</script>");            else                Response.Write("<script>alert('ERROR in sending feedback.')</script>");            txtContactNo.Text = "";            txtEmailId.Text = "";            txtFeedback.Text = "";            txtName.Text = "";        }
```

\
I can't to add feedback to database...!Waiting for reply.......!Thank You.....\
\
\
\


---

Original Source: https://www.mindstick.com/forum/12743/on-button-click-sending-feedback-gui-module-as-a-pop-up-window-and-on-click-of-submit-adding-to-database-using-jquery-dialog-method

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
