Try our conversational search powered by Generative AI!

PageList CurrentPage.LinkURL click event



I have an EPiServer:PageList on an aspx page.

<EPiServer:PageList ID="PageListControl" runat="server" EnableViewState="false" >
<a href="<%#Container.CurrentPage.LinkURL%> "><%# Container.CurrentPage.PageName %></a>

On the same page I allsow have two different views.When the page is loaded one view is active. When the CurrentPage.LinkURL is clicked I want to stay on the same page and activate the other view.

Is there any way I can get the click event for the CurrentPage link and do this.

Jan 30, 2012 11:10

You can use an ASP.NET HyperLink control and add the server side click event there.


Jan 30, 2012 12:07



Maybe you can use a querystring to change view. 

<a href="<%#Container.CurrentPage.LinkURL%>&view=your-view">

And in your code-behind file switch the view.

if (Request.QueryString["view"] == "your-view")
     this.OneView.Visible = false;
     this.SecondView.Visible = true;
     this.OneView.Visible = true;
     this.SecondView.Visible = false;


Jan 30, 2012 12:11
* 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.