Try
Normally, you would do this.
e.Item.ImageUrl = ((SiteMapNode) e.Item.DataItem).ImageUrl;
but the sitemapnode object doesn't have an ImageUrl property so I'm assuming
it's an attribute.
e.Item.ImageUrl = ((SiteMapNode) e.Item.DataItem).Attributes["ImageUrl"];
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hmm, that gives me this error:
System.Web.UI.WebControls.MenuItem.DataItem' is a 'property' but is used
like a 'method'
"Scott M." <s-***@nospam.nospamwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>e.Item.ImageUrl = (SiteMapNode) e.Item.DataItem("ImageUrl");
"Jeff" <it************@hotmail.com.NOSPAMwrote in message
news:uW**************@TK2MSFTNGP05.phx.gbl...
>>Dear reader!
ASP.NET 2.0
How should this line with vb.net code:
be as C#?????
I want to put the code into MenuItemDataBound(object sender,
MenuEventArgs e)
eventhandler.
I came across this vb.net code on the web, but I'm programming in C# so
I need to convert it into C# for to be able to use it
Any suggestions?
Jeff