Hi ,
I have this task to do .
I have a user control that has organization and contact selector rad control . The contact selector has email shown if available. when the contact is selected, i need to show the email in the normal aspx textbox from the contact control. how can i do that? please help by looking at my code as i tried doing like this.
public event Action<string> OnContactChanged;
#region Page Events
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
UserControls_ContactSelectorV2 contact = new UserControls_ContactSelectorV2();
contact.OnContactChanged += ContactChanged;
}
OnContactChanged
is the event in the usercontrol which i tried to invoke here in the parent page.
when i wrote this method:
public void ContactChanged()
{
}
and my textbox was txtEmail but this was not recognized.
my aspx code is like this for textbox:
<asp:TextBox ID="txtEmail" runat="server">
I have included the usercontrol like this :
<uc5:ContactSelectorV2 ID="ContactSelectorV2" runat="server"/>
for which i have registered in the page like this
<%@ Register Src="~/UserControls/ContactSelectorV2.ascx" TagName="ContactSelectorV2" TagPrefix="uc5" %>
Please help asap...