Here are the code for simplest Footnoting a Web Page:
<%@ Page Language="C#" ... Inherits="TestFootNotes._Default" %>
Test Footnoting a web page<br />
Web Pages are structure less<%# RenderFootNoteNumber("struct") %> writting of information. Therefore, annotate certain part of it requires putting a structure at certain location<%# RenderFootNoteNumber("location") %>.
<hr />
Footnotes: <br />
<asp:Repeater ID="Repeater1" runat="server" DataSource="<%# _FootnoteList %>">
<ItemTemplate>
[<%# Eval("key") %>]. <%# Eval("value") %><br />
</ItemTemplate>
</asp:Repeater>
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
DataBind();
}
public Dictionary
public string RenderFootNoteNumber(string AnnotationID)
{
int i=_FootnoteList.Count;
_FootnoteList.Add(i + 1, "Footnote Content for Annotation of " + AnnotationID );
return "<sup>["+_FootnoteList.Count.ToString()+"]</sup>";
}
}
The key is to have _FootNoteList as a holder of footnote counter and content as we going through the Web Page.
No comments:
Post a Comment