We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HyperLink to TOC

Hi Team,

i have a one more question regarding TOC HyperLink . We need to provide the back button (hyperlink) to TOC.

As per current scenario, dynamically we are generating the TOC and if we are clicking on any content of TOC,its going to that particular content . we want additional functionality like once user reached to the original content they have the flexibility to come back again directly to TOC by providing some HyperLink.

if this feature is available then let us know or let us know any alternative…


In your case, we suggest you following solution.

  1. Move the cursor to the TOC field.
  2. Insert bookmark with name e.g. TOC before TOC field.
  3. Insert the link to bookmark at the desired location.

Following code snippet shows how to insert link to bookmark.

DocumentBuilder builder = new DocumentBuilder(doc);
// Insert hyperlink.
// Switch \o is used to provide hyperlink tip text.
builder.InsertHyperlink("Hyperlink Text", @"Bookmark1"" \o ""Hyperlink Tip", true);