Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Control - raising an event
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01327983
Message ID:
01338177
Vues:
20
This message has been marked as a message which has helped to the initial question of the thread.
>However, I don't understand how should I add code to the page that uses this control when the button is clicked.

The same way you'd hook any event handler:
// can add to Page_Load
 this.nameOfUserControl.Search_Clicked += this.NameOfMethodToHandleEvent;

// Some other method in the page.
private void NameOfMethodToHandleEvent(object sender, EventArgs e)
{
   // Code here
}
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform