CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.club_web_site_starter_kit Tags:
Item Type: NewsGroup Date Entered: 7/31/2006 1:02:16 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 21 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
mikedeko
Asp.Net User
Enhancement: Read More link visibility7/31/2006 1:02:16 AM

0/0

It has always bothered me that for a "short" description, by default 50 words or less, the "read more" link still appears even though there is no more to read. I've come up with a solution that I want to share with anyone who's also annoyed by this. I added two functions to the shared_routines.vb file.

Public Function HasMore(ByVal originalInput As Object) As Boolean

Return HasMore(originalInput, TRUNCATE_COUNT)

End Function

Public Function HasMore(ByVal originalInput As Object, ByVal wordsLimit As Integer) As Boolean

If originalInput Is Nothing Or IsDBNull(originalInput) Then

Return False

Else

Dim words() As String = Split(CStr(originalInput))

If words.Length > wordsLimit Then

Return True

Else

Return False

End If

End If

End Function

To use these functions, add the visible attribute to the "read more" link on a page as follows.

<asp:HyperLink ID="newslink" runat="server" NavigateUrl='<%# "news_view.aspx?articleid=" &Cstr( Eval("ID"))%>' visible='<%# hasmore(Eval("description")) %>'>read more &raquo;</asp:HyperLink>

Some of the "read more" links are actually html anchor tags. You'll need to add a runat="server" attribute to the <a> tag in order to have access to a visible attribute.

I have a rather limited test environment so if anyone tries this and has trouble, post back and let me know.

-Mike

lexy
Asp.Net User
Re: Enhancement: Read More link visibility8/19/2006 9:50:23 PM

0/0

Hi Mike,

Finally got up to implementing this.

It seems to work fine so far.

Good job.

Thanks,

Lx


I use VB
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Phantoms Authors: Dean Ray Koontz, Copyright Paperback Collection (Library of Congress), Pages: 434, Published: 2001
Handbook of Literacy and Technology: Transformations in a Post-typographic World Authors: David Reinking, Pages: 379, Published: 1998
Nursing Care of the Older Adult: In the Hospital, Nursing Home and Community Authors: Mildred O. Hogstel, Pages: 624, Published: 1994
The Real Gaze: Film Theory After Lacan Authors: Todd McGowan, Pages: 254, Published: 2007
Blogging for Business: Everything You Need to Know and why You Should Care Authors: Shel Holtz, Ted Demopoulos, Pages: 247, Published: 2006
Images, Signals, and Devices Authors: C. J. McDonald, Pages: 120, Published: 1987

Web:
Link Popularity Enhancement Services – SEO Expert™, Increase Site ... Read more about content enhancement. ... and our link popularity enhancement services maximizes your website visibility across major search engines. ...
Directory submission and link development services from Grantastic ... Directory enhancement and link development are an important part of an online marketing plan. Learn more about our link development and directory submission ...
Enhancement Link Popularity at Link Popularity Guide This is a selection made from among articles on Enhancement Link Popularity. .... (that give your website more directory visibility) obviously costing more. ...
RedAlkemi : Link Popularity : Link Building Services : Inbound ... Apr 10, 2004 ... Building link popularity improves the PageRank of your web pages (Read more about PageRank). The higher the PageRank of your website, ...
Software Enhancement Of Breast MRI Scans Help Radiologists Reduce ... Jun 27, 2007 ... View more news... Most Popular Articles For Breast Cancer. These are the most read articles from this news category for the last 6 months: ...
Children seeking athletic enhancement through surgery. - By ... Jul 20, 2007 ... Humans are more spiteful than chimps, according to new research. ... However, when the food is visible but unreachable and the second chimp ...
Pragmatic Progressive Enhancement So instead of the above example, generate the link only when JavaScript is available .... You read the document dimensions and compare the viewport with it , ...
tone and colour enhancement by `bosniak on deviantART Mar 18, 2006 ... 17960 deviants said Keep them visible at all times ... Artistically gifted, his compassion for others is evident in offe... Read More ...
phpBB • View topic - Admin User Maint (email) link enhancement Admin User Maint (email) link enhancement. This forum is now closed as part of retiring phpBB2. Forum rules. READ: phpBB.com Board-Wide ...
Progressive Enhancement and the Yahoo! User Interface Library (YUI ... Sep 27, 2007 ... Opera Developer Community article: Progressive Enhancement and the ... is called Unobtrusive JavaScript and you can read up on it in more ...

Videos:
The Archimedes Palimpsest Google TechTalks March 7, 2006 Will Noel Roger L. Easton, Jr. Michael B. Toth ABSTRACT The Archimedes Palimpsest is a 10th Century ...




Search This Site:










need some help just installed visual web developer and sql express and get 2 big errors!!!!!!!!!

extended club site starter kit sql script

admin account

clarification on how sql 2005 express works with club app

how to get full source code of club starter kit

so where is the guide (documentation)

expand avatar when clicked

howto: change the password format???

asp.net website administration tool

deploying the clubsite / namespace could not be found

dotnetnuke module :: text/html used for the events

problem to install club starter kit

memberlist.aspx sort

where to default <table> attributes come from in the club starter kit (or any asp.net 20 app?)

durationpicker problem

vcalendar and url with query string issue !!!!

news articles - how do u sort most recent first

loginview - loginview1 error

convert to mysql?

menu alignment issue

deletion of agenda

i run the scripts then what?

listing email addresses causes spam.

string was not recognized as a valid datetime.

http 404 error?

help me! i can't download project

toolbar state

club site changing colours

starting site error

everyone to be able to post?

  Privacy | Contact Us
All Times Are GMT