Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Passing Child Page to Parent Page

$
0
0

I have one two aspx pages, page1.aspx and page2.aspx.

In Page1.aspx : I have one link button and two textboxes.

When i clicked on linkbutton in Page1.aspx , i am opening pop window called Page2.aspx.

In Page2.aspx: I have one TextBox and one Button and one DataGrid.

In Page2.aspx I am searching for client names i.e typing client name IBM in textbox and i hit the Button.

I am showing the Client Name in DataGrid.

When i click the Clientname in DataGrid, i am taking the value of Client Name and Displaying the Client Name in Page1.aspx Textbox1.

If the Client Name is "IBM" then i need to disable the second TextBox2 in Page1.aspx, if client name is not IBM then i need to show client name in textBox1 and TextBox2 should be Readonly.

I wriiten this code in Page2.aspx 

if (ClientNameSelected != "Bounty Jobs")
{
Response.Write("window.opener.document.forms[0]." + textBoxname2 + ".enabled ='" + "True" + "';");
}
else
{
Response.Write("window.opener.document.forms[0]." + textBoxname2 + ".disabled ='" + "False" + "';");
}
Response.Write("window.opener.document." + formName + "." + textBoxname1 + ".value='" + ClientName.Trim() + "';");

 Response.Write("window.close();</scr" + "ipt>");

I am able to disable the TextBox2 in Page1.aspx when client name is IBM

But if client name is IBM then also the TextBox2 is Disable(But i need enable)


Help me.

Thanks. 


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>