Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / May 2005

Tip: Looking for answers? Try searching our database.

ascx event to parent aspx: howto ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Support - 26 May 2005 21:07 GMT
Hello:
Using vb.net
I have a web page home.aspx
that has a placeholder: myplaceholder.
on Page_load:
depending a conditions, I either have:
myplaceholder .Controls.add(MycontrolA)
or
myplaceholder .Controls.add(MycontrolB)
MyControlA contains a submit button
and
MyControlB contains a submit button

I wish to be able to detect in home.aspx
if either
MyControlB.Submit was clicked or if  MyControlA.Submit was clicked.

I tried using in MyControlA
Protected Sub btSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btSubmit.Click
RaiseBubbleEvent(Me, e)
End Sub

but nothing happens in home.aspx

Protected Overrides Function OnBubbleEvent(ByVal sender As System.Object,
ByVal e As System.EventArgs) As Boolean
   Response.Write("<br><br>ParentControl's OnBubbleEvent called.")
   Response.Write("<br>Source of event is: " + sender.ToString())
End Function

Help - what am I missing ?

Thank you!

T
jeff.przylucki@gmail.com - 27 May 2005 20:58 GMT
 Do you have an addHandler line for myControlA /myControlB?

On the post-back do you re-create the myControlA / myControlB ?
Support - 31 May 2005 11:45 GMT
no - I do not recreate myControlA / myControlB because I dont know if it is
the A or B button that was clicked.
That is the objective: which submit button in which control was clicked: if
ButtonA in myControlA then recreate myControlA ...

Thanks
>  Do you have an addHandler line for myControlA /myControlB?
>
> On the post-back do you re-create the myControlA / myControlB ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.