Thursday, February 22, 2007

Open blank page from ASP.NET Menu

I recently had this issue of opening a blank page through ASP.NET menu using treeview and sitemap. Apparently there is no easy option of doing it. But with a little bit of trick this could be achieved.
To open a blank page using a sitemap we can add a javascript in the url attribute of sitemap note.

An example:

A node by clicking which the blank page should be opened.

sitemapnode title="Proc├ędures" description="Proc├ędures" url="javascript:OpenBlankPage();"


and in the javacript function
function OpenBlankPage() {
window.open('site url here');
return;
}
Javascript could directly be added in the url as well.
Voila a small tip which could save you some time.

No comments: