I am trying to create a method, which will allow me to view tag names inside my article text, as hyperlink. So, the aim for preRender method is to identify the tags (from tags table database) in the article text (getArticle) and display the tags as hyperlinks.
I am little unsure about the logic for the preRender method, as I am currently struggling to compile, an working for loop statement.
protected override void OnPreRender(EventArgs e)
{
var ctrl = new HtmlGenericControl("div");
string html = this.GetArticleText();
// not sure how to setup the for-loop???
foreach (var tag in this.LoadAllTags())
{
// html.Replace(tag.key, this.CreateLinkHtml(tag));
}
ctrl.InnerHtml = html;
this.txtDescription.Controls.Add(ctrl);
base.OnPreRender(e);
}
Crea ...
Go to the complete details ...