Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 29th, 2010, 04:27 PM
Registered User
 
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login statsus control Problems

When I use the login status control in conjuction with the login conrol. The login control does not redirect the user to the members page. I have set the login contol destenation url to the members page.

The funny thing is if I do not use the login status control and use a menu link to get to the login page to use the login control then everything works fine. Is this a bug in visual studio. I am very new to programing so any help would be great. I know very little html. I know more about visual basic programing in windows.


This is the Mater page code

<body>
<form id="form1" runat="server">
<div id="Header">
Ft. Branch Masonic Lodge<br />
</div>
<div id="LeftColumn">
<br />
<asp:LoginStatus ID="LoginStatus1" runat="server" />
<br />
<br />
<br />
<asp:LoginName ID="LoginName2" runat="server" />
<br />
<br />
<br />
<asp:LoginView ID="LoginView2" runat="server">
<LoggedInTemplate>
You are now logged in
</LoggedInTemplate>
<AnonymousTemplate>
You are not logged in
</AnonymousTemplate>
</asp:LoginView>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<div id="Mainpage">


<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">

<br />
<br />
This is the Master Page

</asp:ContentPlaceHolder>
<br />
</div>


</div>
</form>
<div id="Footer">
Copyright Ft. Branch Masonic lodge<br />
Created by Chris Render</div>
</body>
</html>



This is the login page.

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<p>
<br />
</p>
<table class="style1">
<tr>
<td class="style2">
<asp:Login ID="LoginControl" runat ="server"
DestinationPageUrl="~/MemberPage/Default.aspx">
</asp:Login>
</td>
<td>
<asp:Image ID="Image1" runat="server" />
</td>
</tr>
<tr>
<td class="style2">
&nbsp;</td>
<td>
&nbsp;</td>
</tr>
</table>
</asp:Content>
 
Old June 30th, 2010, 02:33 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Are you sure this is really the problem and/or the problematic code?

I copied and pasted your code in a new master page, added the other code to Login.aspx and requested that page. I then logged in and was taken to MemberPage/Default.aspx successfully.....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 30th, 2010, 03:08 PM
Registered User
 
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem

No, I am not sure that this is the problem. I can not figure it out for the life of me. I was pretty sure the code should be working. I have no idea what is going on. Like I said if I do not use the login status control everything works fine.

I have even recreated the website and get the same problem. I have went in to the config file and changed the Authentifcation from windows to forms.

I have tryed to figure this out for a couple of times not sure what to do. Any help would be great.
 
Old June 30th, 2010, 03:17 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It seems to work fine for me, so it must be something with the site or configuration that you're no showing us.

Can you upload a fully working site showing the problem somewhere?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 30th, 2010, 03:48 PM
Registered User
 
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem

Yes I would be happy to. How do you upload the site. I am new to this forum. Thank you.
 
Old June 30th, 2010, 04:01 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't think you can. Uploading files is, as far as I know, restricted to authors and Wrox stuff.

A Google or Windows live drive maybe?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old June 30th, 2010, 04:15 PM
Registered User
 
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem

Thanks for trying. If the code is right could it possibly be my the computer that I am testing it on. I have not posted the sight to a server yet, I am still building and testing it before, I post it.

I will take it to a computer at college and debug with visual studio there. I know this is going to not make since but in the past I could write a program at home that would not work on my computer at home and would take it college and it would work.
 
Old June 30th, 2010, 04:21 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Yeah, you can try that. Or send me the zipped site by e-mail. Contact me trough my website to find out my e-mail address.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; June 30th, 2010 at 04:43 PM..
 
Old June 30th, 2010, 04:32 PM
Registered User
 
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem

What is your email?
 
Old June 30th, 2010, 04:42 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Euh, what part of "Contact me trough my website to find out my e-mail address" would you like me to clarify for you? ;-)

Click the link to my site in my signature and send me a message through the contact page.....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with login logic and Dashboard alanphil BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 18 August 13th, 2009 05:04 AM
Login Control Mahill ASP.NET 2.0 Basics 1 May 19th, 2006 02:03 PM
Multiple problems with Login system, GridView hindereduseless ASP.NET 2.0 Professional 0 May 3rd, 2006 01:13 AM
login.aspx problems mike72 BOOK: ASP.NET Website Programming Problem-Design-Solution 4 September 7th, 2005 01:57 AM





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