ITsolutionWizard
asked on
aspx ascx, c#
When the button is clicked on ascx, how can I make List div visible = true on default.aspx?
usercontrol.ascx
<asp:Button runat="server" ID="submitNow" CssClass="btn btn-danger" Text="Save Into Proposal" OnClick="submitNow_Click" />
default.aspx
<div class="panel panel-primary" runat="server" visible="false" id="List"></div>
usercontrol.ascx
<asp:Button runat="server" ID="submitNow" CssClass="btn btn-danger" Text="Save Into Proposal" OnClick="submitNow_Click" />
default.aspx
<div class="panel panel-primary" runat="server" visible="false" id="List"></div>
I did not like the idea of changing parents elements in a user control but anyways...
UserControl ucDiv = (UserControl)MySecondContent.FindControl("List");
ucDiv.Visible = true;
ASKER
MySecondContent ? Where is it coming from?
oops, it should be
me.page or me.parent
try both please...
me.page or me.parent
try both please...
ASKER
it does not work at all.
try
this.Parent
me should be VB
this.Parent
me should be VB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
add a property to your user control, say action, integer and set it on your user conrtrol
then on page, before unload, check this value and set visibility of your div