Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 2nd, 2004, 05:44 AM
Authorized User
 
Join Date: Oct 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying roles.aspx in design view

I am having a problem with the roles.aspx display. When I run it, the page opens ok, but there are bits missing such as the System_Administrator link and the new role text box and button.
If I try to open the file in design view, I get an error message: "Could not open in Design view. Quote values differently inside a '<%..."value"...%>' block". I think the line of html that it doesn't like is:
    <a href="EditRole.aspx?RoleID=<%# DataBinder.Eval(Container.DataItem, "RoleID") %>"><%# DataBinder.Eval(Container.DataItem, "Description") %></a><br/>
Any ideas??

 
Old September 2nd, 2004, 10:06 AM
Authorized User
 
Join Date: Oct 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have made some progress on this. First, the problem with displaying the page in design view seems to be to do with nesting double quotation marks. If I change it as follows:
<a href='EditRole.aspx?RoleID=<%# DataBinder.Eval(Container.DataItem, "RoleID") %>'>
where the outer double quotes have been replaced by a single quote, I can see the page in design view.
The reason why the page has "missing" controls when I run it, is due to the program making controls invisible when the user that has logged on does not have the correct permissions (I should have read on a bit further). It looks like I have to manually fill in some of my database tables with permissions and roles etc. I could not see how to copy the original ThePhile tables, so created my own from scratch, and so are all empty.

 
Old September 2nd, 2004, 07:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you saying that you didn't restore the original tables from the backup file?

Or that you did restore the tables, but you don't want to modify them for some reason?

It's not difficult to make a copy of an existing database using Enterprise Manager. It's a little harder if you just have MSDE.

Eric
 
Old September 3rd, 2004, 04:12 AM
Authorized User
 
Join Date: Oct 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Eric,
I did do a restore of the ThePhile (to MSDE), and so have all of the tables, stored procedures etc. I have also got the ThePhile site working. I am now working through the book, building my own site, which will be similar in some ways to ThePhile. My database will have some quite different tables in it eventually. I suppose I could have started with ThePhile database and edited/added to the the tables as needed, but I wanted to be sure I could create everything from scratch, so I created a new database (using MSDE and Visual Studio). I cut and pasted the stored procedures, but couldn't see a similar way of copying the databases, so I created new(and therefore empty tables).
By the way, have you ever used Visual Studio (Professional) to debug Stored Procedures (with MSDE). I can't seem to get the Login working, and wanted to debug the sp_Accounts_ValidateLogin stored procedure. I have enabled SQL debugging in VS, but if I try to use a breakpoint in the stored procedure it doesn't stop at that breakpoint, and if I try to use VS Server Explorer to step into the procedure, it just gives me an error message - "Cannot debug stored procedures becaue the SQL Server database is not setup correctly or user does not have permission to execute master.sp_sdidebug".
Nigel


 
Old September 3rd, 2004, 08:00 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I never tried debugging into SP's with MSDE, and the SPs for ThePhile are not very complex, so I never tried debugging into any of them. I prefer to debug them by writing small test code in Query Analyzer that calls them with specific arguments and lets me see the results.

Did you install WinXP SP2? This is known to mess up SQL Debugging:
http://support.microsoft.com/default.aspx?kbid=839280

You can use some tools to create insert scripts of the data in your tables. Then you can run these scripts with in another DB to insert the data there. The free SqlWebAdmin tool discussed in the book can be used for this. I like another free tool called ObjectScriptr:
http://www.rac4sql.net/

If your login isn't working, it's usually caused by bad password values in the DB. These are stored as hashed values - not plain text.

Eric
 
Old September 3rd, 2004, 08:38 AM
Authorized User
 
Join Date: Oct 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, I am running Windows 2000. I am pretty sure the problem is with the password. I am pretty ignorent when it comes to databases etc. so I don't even know what scripts to use. I want to check what the actual password is that is stored in the database table, to compare to the encrypted one I am sending to it, but I don't know how to read the value. I just see it is a binary value, but I can't inspect its contents.
Thanks for your help.
Nigel

 
Old September 3rd, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You should get an intro book on SQL Server before trying to implement a project like this. This is not a "turnkey" type of application that can be installed and used. This will require some knowledge of SQL Server and ASP.NET in order to customize this application to meet your needs.

As for MSDE, it is intended for use in deploying applications to end-user systems. It really wasn't intended to be used by developers. You will need graphical tools to help you learn, and the SQL Server 2000 Books On Line (in the Help system) is very helpful. You can get the Developer edition of SQL Server 2000 for around $50, and it comes with everything you need.

There are some free tools for use with MSDE (like SqlBuddy: http://sqlbuddy.sourceforge.net), but these tools are not going to be what companies are looking for. If you want a job in ASP.NET Web Development, then you will need experience with the Microsoft tools.

Eric





Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot view the design of the .aspx page sansircar ASP.NET 1.0 and 1.1 Professional 1 October 24th, 2006 01:31 PM
Blank Design View ??? smuger Dreamweaver (all versions) 4 October 11th, 2004 04:40 PM
DataList <a Href> Question in Roles.aspx bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 5 October 5th, 2004 02:54 PM
roles.aspx error groupmatch BOOK: ASP.NET Website Programming Problem-Design-Solution 4 September 13th, 2004 02:39 PM
Could not open in design view!! texasraven ASP.NET 1.x and 2.0 Application Design 4 March 17th, 2004 03:22 PM





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