Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

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>
Avatar of HainKurt
HainKurt
Flag of Canada image

dont do that...

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
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;

Open in new window

Avatar of ITsolutionWizard

ASKER

MySecondContent ? Where is it coming from?
oops, it should be

me.page or me.parent

try both please...
it does not work at all.
try

this.Parent

me should be VB
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial