473,387 Members | 1,455 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Capture child event in parent

I have got a task and i would like to know ways how it could be done.
I have got .aspx file and it includes user control (ascx)
i want to do that after clicking edit button in user control tabs in
parent(aspx) become disabled.
i tryed to do it by putting value into hidden field under usercontrol
and make public to read from it but it does not work because first
loads prent after it loads child and only than button_click happens
and parent does not know that edit button was clicked before second
forced refreash.

Please help me to sort this somehow

Oct 26 '07 #1
1 1329
This is the simplest method I can think of right now.

In ASCX, let's examine C# (just because the solution I am copying from is
C#).

//Create Event handler
public event EventHandler RegisterCustomer;

//Send event
//Sender and e can be nulled or resent from the event handler
//on the ASCX
RegisterCustomer(sender, e);
In ASPX, I have VB (yes, the solution was built by two people, part C#, part
VB)

Protected Sub RegisterUnit1_BubbleUpRegister(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Register.RegisterCustomer

'Code for registration

End Sub
In C#, you would wire the event handler instead using the delegate wiring
method. I do not have a bit of code I can quickly copy.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Weblancer" <Ir******@gmail.comwrote in message
news:11**********************@d55g2000hsg.googlegr oups.com...
>I have got a task and i would like to know ways how it could be done.
I have got .aspx file and it includes user control (ascx)
i want to do that after clicking edit button in user control tabs in
parent(aspx) become disabled.
i tryed to do it by putting value into hidden field under usercontrol
and make public to read from it but it does not work because first
loads prent after it loads child and only than button_click happens
and parent does not know that edit button was clicked before second
forced refreash.

Please help me to sort this somehow

Oct 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
3
by: Frank T. Clark | last post by:
How do I redirect or capture keydown events in a parent form from a child form? I have a main form which displays another informational form marked "SizableToolWindow". Form child = new...
4
by: Danny Tuppeny | last post by:
Hi all, I've been trying to write some classes, so when I have a parent-child relationship, such as with Folders in my application, I don't have to remember to add a parent reference, as well as...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
1
by: Aaron Smith | last post by:
I have a parent table that has one child table. The parent has a single field (ID, AutoIncrement, Seed 0, Step -1 in the DataSet, Seed 1, step 1, in DataSource). The child is linked to this ID...
9
by: astro | last post by:
I've tried the following without success....... AddHandler DS1.Tables("dial").RowChanged, AddressOf after_row_insert AddHandler CType(Me.dgDials.DataSource, DataTable).RowChanged, AddressOf...
4
by: Richard Lewis Haggard | last post by:
What is the mechanism by which a child window can notify its parent that it has been clicked on? -- Richard Lewis Haggard www.Haggard-And-Associates.com
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.