Welcome to Singapore blogs
Sign in
Singapore blogs
Search Options
Search Everything
Search Development
Home
Hubs
DotText
chuacw
Cape of Good Hope
Development
Appeal Letters readers
YP School 2007 Alumni
chuacw
frove
frove
Technical
eCommerce
More ...
Implementing a rel="nofollow" HyperLink serverside control with the Borland Delphi 2005 IDE
Home
Blog
Wiki
Chee Wee's discoveries and tech blog
Changing the world one line of code at a time...
RSS for posts
Options
Share this
Implementing a rel="nofollow" HyperLink serverside control with the Borland Delphi 2005 IDE
chuacw
Wed, 26 Jan 2005 @ 9:51 AM
Comments
0
Following the various blogs on
Google
,
Simon Willison's
, and
Six Apart Professional Network
,
Robert Love's
,
Scott Watermasysk's
, among others, I have implemented a C# server side control using the Borland Delphi 2005 IDE that extends the HyperLink webcontrol to support the rel="nofollow" attribute.
The Borland Delphi 2005 IDE now can support the following languages: C#, Delphi (Win32 and .NET), and Visual Basic.NET.
The code you see will be pretty much self-explanatory for those of you familiar with the ASP.NET Framework.
[ToolboxData("<{0}:HyperLinkNoFollow runat=server>")]
public class HyperLinkNoFollow : System.Web.UI.WebControls.HyperLink
{
private bool _NoFollow = true;
[Bindable(true), DefaultValue(true)]
public bool NoFollow
{
get
{
return _NoFollow;
}
set
{
_NoFollow = value;
}
}
private string _FollowList = "";
[Bindable(true), DefaultValue("")]
public string FollowList
{
get { return _FollowList; }
set { _FollowList = value; }
}
protected override void AddAttributesToRender(HtmlTextWriter writer)
{
bool LFollow = false;
if (_NoFollow)
{
string LFollowList = _FollowList;
string Url = NavigateUrl;
string[] Domains = null;
char[] Splitter = {';'};
if (LFollowList!=null)
Domains = LFollowList.Split(Splitter);
if (Domains!=null)
{
for(int x=0; x
{
LFollow|=(Domains[x]!="")&&(Url.IndexOf(Domains[x])>-1);
if (LFollow) break;
}
}
if (!LFollow) writer.AddAttribute("rel", "nofollow");
}
// writer.AddAttribute("Follow", LFollow.ToString());
base.AddAttributesToRender(writer);
}
}
0 Comments
C#
Chee Wee's discoveries and tech blog
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Chee Wee's discoveries and tech blog
More Delphi 8 updates!
Posted
over 21 years ago
by
chuacw
1
Comments
Delphi 8 update #2 was released last week. Read all about it here . Delphi IDE Architect Allen Bauer will be releasing the Automated IDE incident reporting...
Chee Wee's discoveries and tech blog
Delphi 8 Update #2
Posted
over 21 years ago
by
chuacw
1
Comments
From an anonymous source: Delphi 8 Update #2 should be out within a week. Delphi 8 Update 2 delivers new demos, and updated source code, so check out the...
Chee Wee's discoveries and tech blog
Borland newsgroups and website down
Posted
over 21 years ago
by
chuacw
0
Comments
As of 2040hrs, Borland's newsgroups, websites, have been down for a few hours.
Chee Wee's discoveries and tech blog
Asia support for C# and Delphi
Posted
over 21 years ago
by
chuacw
0
Comments
I have recently started looking into the possibility of providing support for Delphi and C# in the region of Asia. Some questions that popped into my mind...
Chee Wee's discoveries and tech blog
Called two companies
Posted
over 21 years ago
by
chuacw
0
Comments
I've called two companies up, thinking they might have projects in Delphi, and as circumstances would have it, they do not have projects in Delphi. Another...
Chee Wee's discoveries and tech blog
Added IP banning support
Posted
over 21 years ago
by
chuacw
0
Comments
IP banning support was added recently. This gives High Performance Chat Server the ability to ban selected IP addresses, or IP ranges from accessing itself...
Chee Wee's discoveries and tech blog
Why VCL for .NET?
Posted
over 21 years ago
by
chuacw
0
Comments
Why did Borland create VCL for .NET, and when should you use it instead of .NET's own Windows Forms framework?...
Chee Wee's discoveries and tech blog
NTU / NUS lecturers should really improve the things they teach to students
Posted
over 21 years ago
by
chuacw
0
Comments
I was approached by a friend whose relative (let's call this friend's relative, person B) had a problem with a certain programming language to solve those...
Chee Wee's discoveries and tech blog
Spammers
Posted
over 21 years ago
by
chuacw
0
Comments
Spammers have located the email address for this blog, and therefore, with immediate effect, I am creating a new email address for this blog. The way to...
Chee Wee's discoveries and tech blog
SMTP Authentication added
Posted
over 21 years ago
by
chuacw
0
Comments
Added SMTP authentication to the Forum software I'm developing.
Page 65 of 68 (673 items)
«
63
64
65
66
67
»
Tags
Accomplishments
Android
Blockchain
C#
CodeGear
Community Server
Delphi
Delphi for .NET
Delphi for Win32
DotText development / enhancement articles
Experiments
General
Hacking
Java
Javascript
Latest rumours / news about Borland Delphi 2005
Movies CMS for Migration
My RSS Reader
Network
OTA
Projects / Businesses
Security
ToolsAPI
Undocumented
Windows