I can't get the Login in the stuff below to hide on login....
It's a form with a UC that holds a vanilla Login Control
On LoggedIn, the UC raises an event that's intercepted by the parent page, which attempts to make the Login Control not visible.
Event is raised and intercepted fine, and the visible = false executes, but the page doesn't change appearance. This was the distillation of a more complex page/control set; but the "problem" happens right here in this very simple case.
I've done very similar things with UC's that didn't include a login control, they work fine.
I suspect it's the special nature of the Login Control, but I'm not sure what that might be....
Any suggestions on what's happening here, why I can't hide the login control in this way, would be appreciated.
Thanks!
===================== Page
<%@ Page Language="
VB" AutoEventWireup="false" CodeFile="a897_LoginUCtest.aspx.
vb" Inherits="App_Pages_zzTest_a897_LoginUCtest" %>
<%@ Register Src="a8993_Login.ascx" TagName="a8993_Login" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<uc1:a8993_Login ID="A8993_Login1" runat="server" />
</div>
</form>
</body>
</html>
=============================== Code behind of page
Partial Class App_Pages_zzTest_a897_LoginUCtest
Inherits System.Web.UI.Page
Public Sub LogInComplete(ByVal sender As Object, _
ByVal e As CommandEventArgs) Handles A8993_Login1.LogInComplete
Me.A8993_Login1.Visible = False
End Sub
End Class
=============================== UC
<%@ Control Language="
VB" AutoEventWireup="false"
CodeFile="a8993_Login.ascx.
vb" Inherits="a8993_Login" %>
<asp:Login ID="Login1" runat="server" Style="position: relative">
</asp:Login>
==================================Code Behind of UC
Partial Class a8993_Login
Inherits System.Web.UI.UserControl
Public Event LogInComplete As CommandEventHandler
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login1.LoggedIn
Dim args As New CommandEventArgs("LogInComplete", "LogInComplete")
RaiseEvent LogInComplete(Me, args)
End Sub
End Class
====================================