Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Open external link in new tab/window

Vote:
 

Hello

If i want to open an external link in a new tab/window (ie. target="_blank") how can i do that inline derived from the CurrentPage?

 

Ex.

<a href="<%# Container.CurrentPage.LinkURL %>" target="<%# Container.CurrentPage.Target %>"><%# Container.CurrentPage.PageName %></a>

where the Container.CurrentPage.Target is mockup and i need to know what the correct syntax is.

/Jonas

#50721
May 10, 2011 16:39
Vote:
 

It's Container.CurrentPage["PageTargetFrame"]

You can se all predefined properties here: http://sdk.episerver.com/library/cms6.1/html/P_EPiServer_Core_PageData_Property.htm

#50722
May 10, 2011 16:53
Vote:
 

Thx!

 

/Jonas

#50740
May 11, 2011 12:14
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.