Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 December 5th, 2006, 02:15 PM
Authorized User
 
Join Date: Nov 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
Remember in this case I had to create the tables myself in the database on the seperate server...I made photoID the PK but did not set the identity setting.

Yes I will post the URL in a day or two...Since I was working on debugging the site I hadn't taken the time to fill it up with valid pictures and content.

 
Old December 5th, 2006, 06: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

Ah, right. That explains it.

Looking forward to seeing the site...

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old December 18th, 2006, 09:42 PM
Authorized User
 
Join Date: Nov 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar,
Okay I finally have some content up and feel comfortable allowing you to take a look! I am really only getting started on the project and will continue to add and clean it up going forward. URL is as follows:

http://www.dean-thomas.info/128th_Photo_Gallery

Some things I noted that I would like to adjust or enhance were as follows:

1. Adjust the size of the thumbnails, i.e. make them rectangles rather than squares...squares not optimum for portrait type images.

2. Increase the allowable length of the photo description field if possible. Seems to chop off after two or three sentences (possibly set to 255 characters?). Would be nice if these were multi-line or memo type fields. I haven't had a chance to check to see if this was a function of the application or the database itself?

3. Add security so folks viewing images cannot simply right-click on them to "Save Photo" and take a copy of the images...in the past I have done this with simple Javascript...not sure if I can use the same code here?

4. Could not figure out how to include line breaks in the Title attribute that is defined in the web config...had to use spaces ( ) to tweek it to look the way I wanted it to, but this does not seem professional or robust.
All for now.
Dean

 
Old December 19th, 2006, 03:59 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 Dean,

Site looks good! Interesting collection of pictures....

1. I think right now you're setting both the Width and the Height of the image to 95px, right?

If you only set the Width, the Height will scale according to the dimensions of the images.

Alternatively, take a look at chapter 11 - Greeting Cards. It demonstrates a reusable code library used for resizing / scaling images (and other image processing functions). You can use the code from that chapter to create true thumbnails of the images when you uploading them, instead of letting the user download the real (and thus large) image and then scale it client side. Your site will become a lot faster as well as you save a lot of bandwidth.

2. The Description field of the Photo table is a varchar(300). You can change the size (or change it to varchar(max)) in the database. If you do that you also need to change the Stored Procedure add_photo.

3. You can browse the JavaScript forum at this Wrox forum for some ideas. Basically, you can implement the same stuff as you did before. You can use the Attributes collection of an Image (possibly in a server side event like ItemDataBound on the DataList) and use the Add method to add the required JavaScript.
However, personally I wouldn't bother with it too much. Disabling JavaScript in the browser requires exactly one click (two at the most) so determined people can still steal your images. I'd look into some Copyright and legal stuff instead.

4. Where would you like these line breaks to appear? The Title is, AFAIK, only used for the Title of the page (which in turn is shown in the address bar of the browser) and that doesn't allow (or at least display) the line breaks in the first place.....
If you do want to embed HTML in an app setting, you can escape it. E.g.:

<br /> for a line break. You may need to unescape it again at run-time....

Hope this helps,

Imar







Similar Threads
Thread Thread Starter Forum Replies Last Post
Hosted Form of Component angelboy C# 2005 7 March 31st, 2008 02:36 PM
Hosted BeerHouse and sub directory gb012993 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 16th, 2008 01:48 AM
Events with IIS hosted remoting koraykazgan C# 1 May 1st, 2007 03:49 PM
How to point Login tool to hosted database? asp_convert ASP.NET 2.0 Professional 3 February 7th, 2007 04:57 PM
Setting up a Site hosted on a IIS6 in Dreamweaver deanphilpin Dreamweaver (all versions) 1 November 4th, 2003 12:42 PM





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