I have a Intranet page that has a Site.map driven
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
or
window appears ideally giving me the option to select the size.
Example code for site map file
Edit,
After following the url <a href="http://coloboxp.wordpress.com/2007/...menu-control-to-open-a-popup-window-centered/" rel="nofollow noreferrer" title="Help">Here</a> in the comments I am much closer. However I am getting an error.
For some reason it is only binding the standard sitemap attirbuites (title , url etc) and errors (<strong>DataBinding: 'System.Web.SiteMapNode' does not contain a property with the name 'address'</strong>) 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 tailor 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
should it not be
when using this however for non standard sitemap parameters (address, height etc) it throws errors?
Code:
ASP
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
Code:
new
Code:
pop up
Example code for site map file
Code:
<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 <a href="http://coloboxp.wordpress.com/2007/...menu-control-to-open-a-popup-window-centered/" rel="nofollow noreferrer" title="Help">Here</a> in the comments I am much closer. However I am getting an error.
Code:
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 (<strong>DataBinding: 'System.Web.SiteMapNode' does not contain a property with the name 'address'</strong>) 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 tailor 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
Code:
title = ((SiteMapNode)(e.Item.DataItem))["title"];
should it not be
Code:
title = ((System.Web.SiteMapNode)(e.Item.DataItem)).Title;
when using this however for non standard sitemap parameters (address, height etc) it throws errors?