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

June 29th, 2010, 04:27 PM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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">
</td>
<td>
</td>
</tr>
</table>
</asp:Content>
|

June 30th, 2010, 02:33 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

June 30th, 2010, 03:08 PM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 30th, 2010, 03:17 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

June 30th, 2010, 03:48 PM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem
Yes I would be happy to. How do you upload the site. I am new to this forum. Thank you.
|

June 30th, 2010, 04:01 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

June 30th, 2010, 04:15 PM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|

June 30th, 2010, 04:21 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
Last edited by Imar; June 30th, 2010 at 04:43 PM..
|

June 30th, 2010, 04:32 PM
|
Registered User
|
|
Join Date: Jun 2010
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Problem
What is your email?
|

June 30th, 2010, 04:42 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|
 |