Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 September 29th, 2009, 11:25 PM
Registered User
 
Join Date: Sep 2009
Posts: 4
Thanks: 3
Thanked 0 Times in 0 Posts
Thumbs up Login thread continued

Hello,
I lost my password and this is a "new client" which continues the Login problem under Dan Cern
1.
Regarding the login issue, the management works fine. Only specified users have access as expected. The problem is with all other users. When I do "View in Browser" from solution explorer I expect to see the Login page first but I get homepage instead.
I CAN do login if I wish but I can just view site without login. It seems to me the web.confic should direct site to Login.aspx and not to Default.aspx but I haven't found in web.config any directive to either files.

2.
Regarding the issue of making a line in Reviews/All.aspx a link. I want the text under Title to by a hyperlink. What I understood from your answer is that in the database [Reviews table,Title field] I write the link as is. For example: http://www.google.com.
If the location is under a folder in the site itself, should do something like ~/About/AboutUs.aspx or url="~/About/AboutUs.aspx" ?
That is from the DB side.
Now for the solution side.
You wrote me:
Instead, enter http://www.google.com in the database and bind the NavigateUrl to it, like this:

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "Eval("Title").ToString() %>'
Text='<%# Eval("Title") %>'></asp:HyperLink>
(Taken from Reviews/All.aspx and changed the NavigateUrl attribute)

1. Should I gather from here that when you write "Title" it is so because that happens to be the name for the field where I keep the actual link in DB?
2. Should I write <asp:HyperLink ID="HyperLink1" as is? What is the meaning of HyperLink1 in this context?
3. Is the location to put this <asp.. in the GridView of Reviews/All.aspx which displays the table?

I appreciate your help as I have spent a long time trying various options unsuccessfully.

Best wishes,
Dan Cern

Last edited by DanCern; September 29th, 2009 at 11:27 PM.. Reason: spelling error
 
Old September 30th, 2009, 05:03 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Dan,

1) Not sure what you're asking or saying. I guess it all depends on how you browse to the site and how you configured VWD. Why would you see Login? What page do you access / open in VWD?

Quote:
Regarding the login issue, the management works fine. Only specified users have access as expected
Quote:
but I can just view site without login
These two seem to contradict. Either you can view it without logging in or you can't. What exactly are you expecting from the security system? You only blocked access to /Management so you can see the rest without logging in. Maybe you need to clarify more exactly what you're doing, expecting and witnessing. Also, posting relevant parts of web.config would help as well.

2)

Quote:
1. Should I gather from here that when you write "Title" it is so because that happens to be the name for the field where I keep the actual link in DB?
Yes, exactly. I suggested that as you hinted that you changed the Title column. Clearly, a column like TitleLink or TitleNavigateUrl would be much more descriptive.

Quote:
2. Should I write <asp:HyperLink ID="HyperLink1" as is? What is the meaning of HyperLink1 in this context?
HyperLink1 is just the ID of the control so you can program against it. 99% of the controls in the PlanetWrox site have an ID. If you don't need to access the link in ode Behind or at the client, you can leave out the ID. Again, something like TitleLink would be more descriptive,

Quote:
3. Is the location to put this <asp.. in the GridView of Reviews/All.aspx which displays the table
You probably need to put it where you previously had the code you initially posted. But of course it all depends on where you want to display it. In a single page, it would be different than on a list with, say, a Repeater, a GridView or a ListView.

BTW: did you see the I forgot my password link below the Login box?

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!
The Following User Says Thank You to Imar For This Useful Post:
DanCern (September 30th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot implicitly convert type 'Login' to 'System.Web.UI.WebControls.Login' fh84 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 January 23rd, 2009 11:17 AM
Best Method of Using Book, continued bobhagan BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 August 27th, 2006 04:32 PM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





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