kavitha vemula

kavitha vemula

  • NA
  • 13
  • 2.4k

saving the text given in modal pop up to datatable

Jul 7 2016 7:42 AM

in my application i have a button when user clicks on the button we should get a modal pop with 4 text boxes,after entering the text in these text boxes when user click on add button the pop up should be disappered and the text should be saved in data table how can i do this

in first web form-where user can click a button

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">

.Background

{

background-color: Black;

filter: alpha(opacity=90);

opacity: 0.8;

}

.Popup

{

background-color: #FFFFFF;

border-width: 3px;

border-style: solid;

border-color: black;

padding-top: 10px;

padding-left: 10px;

width: 400px;

height: 350px;

}

.lbl

{

font-size:16px;

font-style:italic;

font-weight:bold;

}

</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>
<asp:Button ID="Button1" runat="server" Text="Fill Form in Popup" />



<cc1:ModalPopupExtender ID="mp1" runat="server" PopupControlID="Panl1" TargetControlID="Button1"

CancelControlID="Button2" BackgroundCssClass="Background">

</cc1:ModalPopupExtender>

<asp:Panel ID="Panl1" runat="server" CssClass="Popup" align="center" style = "display:none">

<iframe style=" width: 350px; height: 300px;" id="irm1" src="WebForm2.aspx" runat="server"></iframe>

<br/>

<asp:Button ID="Button2" runat="server" Text="Close" />

</asp:Panel>

</form>
</body>

in second webform -where user can see a pop up after button click
 
<table>

<tr>

<td>

<asp:Label ID="Label1" runat="server" CssClass="lbl" Text="First Name"></asp:Label>

</td>

<td>

<asp:TextBox ID="TextBox1" runat="server" Font-Size="14px" ></asp:TextBox>

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label2" runat="server" CssClass="lbl" Text="Middle Name"></asp:Label>

</td>

<td>

<asp:TextBox ID="TextBox2" runat="server" Font-Size="14px" ></asp:TextBox>

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label3" runat="server" CssClass="lbl" Text="Last Name"></asp:Label>

</td>

<td>

<asp:TextBox ID="TextBox3" runat="server" Font-Size="14px" ></asp:TextBox>

</td>

</tr>

<tr>

<td>

<asp:Label ID="Label4" runat="server" CssClass="lbl" Text="Gender"></asp:Label>

</td>

<td>

<asp:TextBox ID="TextBox4" runat="server" Font-Size="14px" ></asp:TextBox>

</td>

</tr>

<tr>

<td>
 
</table>
</form>
the user first see's a button after running the program now after clicking the button we can see a model pop-up with four text boxes now what i need is after giving the text in text boxes when i click on button the text that is given should be saved in data table how can i do this. 
 
 
 

Answers (1)