[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Asp

Posted on 2011-10-19
9
Medium Priority
?
193 Views
Last Modified: 2013-12-16
Hi,
I need to  add callback in parent page, How?
Thanks
<%= cbBox.ClientObjectId %>.Callback("99");
0
Comment
Question by:samprg
  • 5
  • 4
9 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36996049
When you say "parent page," is your child a content page and your parent a master page, or is your child a user control and your parent a regular page?
0
 

Author Comment

by:samprg
ID: 36996073
My child page is a user control and my parent is a regular page
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 36996206
You should be able to do:

<% ((SpecificClassOfParentPage)Page).NameOfParentFunction("99"); %>

Open in new window


So if your parent were called "MyAwesomePage.aspx", then it should have a class in code-behind called "MyAwesomePage". If you had a function in this class called "SuperFantasticFunction", then the above example would be:

<% ((MyAwesomePage)Page).SuperFantasticFunction("99"); %>

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36996208
P.S.

In case it wasn't apparent, the above code would be found in the UserControl's code/markup.
0
 

Author Comment

by:samprg
ID: 36996281
OK ,
My parent : Parent.aspx
My child :  child.ascx  // User control
code in child.cs :  rpt
So  should I    use in javascript
<% ((Parent)Page).rpt("99"); %>
0
 

Author Comment

by:samprg
ID: 36996294
Good note:
I load user control dynamically
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 36996295
So  should I    use in javascript
The code I posted was intended for the UserControl's markup (child.ascx) file. It would be executed during the child control's Load event.
0
 

Author Comment

by:samprg
ID: 36996376
I have this javascript function in parent.aspx,
I need to callback child

function FN(item)
{
    var It = Getx(item);
   <% ((Child)Page).List_Callback(it); %>
}
0
 

Author Comment

by:samprg
ID: 36996395
List_Callback in UserControl's markup child.ascx.cs
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Integration Management Part 2
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question