I have created one web user control
and I placed that in login
page. When I click on submit button the user control has to display and it will redirect to home page.
Coming to my code, I have placed that user control in
<div id="divloginUControl">
<td></td>
<td>
<LUC:LoginLoader ID="loginUserControl" runat="server" />
</td>
</div>
When the login page is loaded the user control is highlighting. For hiding user control I wrote
protected void Page_Load(object sender, EventArgs e)
{
//divloginUControl.Visible = false;
loginUserControl.Visible = false;
}
and for submit button
protected void Button1_Click(object sender, EventArgs e)
{
loginUserControl.Visible = true;
}
but it is not working for submit button.
Please give suggestions.
In what event are you setting the Visible property? If you're doing it in inline code, that is processed after the event handlers, so you'll just set Visible back to false just before final rendering.