So, I have a user control, Parent.ascx:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Parent.ascx.cs" Inherits="Parent" %> <%@ Register TagPrefix="cc" TagName="Child" Src="~/Child.ascx" %> <asp:HiddenField ID="hfId" runat="server" /> <cc:Child ID="child1" runat="server" />
My child control Child.ascx contains a button, and in the code lock I want to access the value of the hidden field hfId in the click event of this button
I cannot use the user control attribute and set it to Page_Load because the value of this hidden field changes through jQuery events in the Parent.ascx control
source share