test it step by step
Hi Luigi
Try on the page and make sure that it works, then test in next level (in the Pane of an Accordion)
WebUserControl.ascx:
====================
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %>
<asp:Button ID="Btn1" Text="Button In Usercontrol" runat="server" onclick="Btn1_Click" />
<asp:Label ID="ResultLabel" runat="server"></asp:Label>
WebUserControl.ascx.cs:
=====================
protected void Btn1_Click(object sender, EventArgs e)
{
ResultLabel.Text = ((Button)this.NamingContainer.FindControl("btnSend Request")).Text;
}
default.aspx:
=====================
<asp:Button ID="btnSendRequest" Text="Send Request Button" runat="server" />
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
it works! so you can test in other situations.
your firstname brings 'Luigi Collina' in my mind!!
__________________
happy every time, happy every where
Reza Baiat
|