Click here to Skip to main content
13,092,862 members (70,928 online)
Rate this:
Please Sign up or sign in to vote.
See more:

When i press F2 on textbox it should open gridview on new page(Child Page) and selected row on that gridview it should return values to textbox(Parent Page).

I tried but im getting values on Child Page not on Parent Page.
Pls Help.
My Code as follow:

<script type="text/javascript">
function OpenPopup(objevent)
if (event.keyCode == 113)
document.onhelp = function () { return (false); }
window.onhelp = function () { return (false); }"ATMDetails_popup.aspx", "List", "scrollbars=no,resizable=yes,width=400,height=280");

<asp:TextBox ID="txtATMID" runat="server" onkeydown="OpenPopup(this)"></asp:TextBox>


protected void Page_Load(object sender, EventArgs e)
txtATMID.Text = Request.QueryString["ATMID"];
txtSiteType.Text = Request.QueryString["ATM_Type"];
txtBankName.Text = Request.QueryString["Bank"];
txtDeployedBy.Text = Request.QueryString["Remarks2"];
txtSiteLocation.Text = Request.QueryString["Location"];
txtSiteAddress.Text = Request.QueryString["ATM_Address"];
txtLiveDate.Text = Request.QueryString["Live_Date"];
txtAtmStatus.Text = Request.QueryString["ATM_status"];

<asp:SqlDataSource ID="ATMDetailsds" runat="server"
ConnectionString="<%$ ConnectionStrings:Connection %>"
SelectCommand="SELECT [ATMID], [ATM_Type], [Bank], [Remarks2], [Location], [ATM_Address], [Live_Date], [ATM_status] FROM [ATMMaster]">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" DataKeyNames="ATMID" DataSourceID="ATMDetailsds">
<asp:HyperLinkField DataNavigateUrlFields="ATMID, ATM_Type, Bank, Remarks2, Location, ATM_Address, Live_Date, ATM_Status"
Text="SELECT" />
<asp:BoundField DataField="ATMID" HeaderText="ATMID" ReadOnly="True"
SortExpression="ATMID" />
<asp:BoundField DataField="ATM_Type" HeaderText="ATM_Type"
SortExpression="ATM_Type" />
<asp:BoundField DataField="Bank" HeaderText="Bank" SortExpression="Bank" />
<asp:BoundField DataField="Remarks2" HeaderText="Remarks2"
SortExpression="Remarks2" />
<asp:BoundField DataField="Location" HeaderText="Location"
SortExpression="Location" />
<asp:BoundField DataField="ATM_Address" HeaderText="ATM_Address"
SortExpression="ATM_Address" />
<asp:BoundField DataField="Live_Date" HeaderText="Live_Date"
SortExpression="Live_Date" />
<asp:BoundField DataField="ATM_status" HeaderText="ATM_status"
SortExpression="ATM_status" />
Posted 25-Apr-13 22:05pm
ryanb31 26-Apr-13 7:48am
Where are you stuck?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 26 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100