I have a Intranet page that has a Site.map driven ASP Menu control that drives the entire site.
For most of my pages pushing the user to a new content page within the current window is great.
However for certain large reports there is simply not enough real estate to comfortably display the entire page.
Is it possible when clicking certain nodes that a new or "pop up" window appears ideally giving me the option to select the size.
Example code for site map file
<siteMap>
<siteMapNode title="Top" >
<siteMapNode title="Menu 1" >
<siteMapNode title="Report" url="~/Iwantthisurl-to-pop-out.aspx"/>
</siteMapNode>
</siteMapNode>
</siteMap>
Edit,
After following the url Here in the comments I am much closer. However I am getting an error.
Protected Sub Menu1_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs)
Dim address As String = String.Empty
Dim heigth As String = String.Empty
Dim width As String = String.Empty
Dim title As String = String.Empty
Dim url As String = String.Empty
Dim poptest As String = String.Empty
poptest = CStr(DataBinder.Eval(e.Item.DataItem, "url"))
If String.IsNullOrEmpty(poptest) Then
address = CStr(DataBinder.Eval(e.Item.DataItem, "address"))
heigth = CStr(DataBinder.Eval(e.Item.DataItem, "heigth"))
width = CStr(DataBinder.Eval(e.Item.DataItem, "width"))
title = CStr(DataBinder.Eval(e.Item.DataItem, "title"))
url = CStr(DataBinder.Eval(e.Item.DataItem, "url"))
Else
End If
For some reason it is only binding the standard sitemap attirbuites (title , url etc) and errors (DataBinding: 'System.Web.SiteMapNode' does not contain a property with the name 'address') when putting a breakpoint in I can read the standard attributes its the custom ones that done seem to be getting passed
So frustrating as I am so close!!
Edit 2 :
Found a way to open another window by using the _blank command but does not give me the ability to talior the window size and remove address bars etc. If anyone can get the example of the linked page to work I would love to see an example!
Edit 3 :
Convinced its something to do with these lines
title = ((SiteMapNode)(e.Item.DataItem))["title"];
should it not be
title = ((System.Web.SiteMapNode)(e.Item.DataItem)).Title;
when using this however for non standard sitemap parameters (address, height etc) it throws errors?