Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 3rd, 2006, 05:14 PM
Authorized User
Points: 514, Level: 8
Points: 514, Level: 8 Points: 514, Level: 8 Points: 514, Level: 8
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login Control behavior

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.


===================== 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>
    <form id="form1" runat="server">
        <uc1:a8993_Login ID="A8993_Login1" runat="server" />
=============================== 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">
==================================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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
login control hastikeyvan ASP.NET 3.5 Basics 1 May 7th, 2008 04:47 AM
Login Control Behavior when pressing ENTER rsearing ASP.NET 2.0 Basics 6 July 22nd, 2007 08:21 PM
Login Control Mahill ASP.NET 2.0 Basics 1 May 19th, 2006 02:03 PM

All times are GMT -4. The time now is 04:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.