Rank: Newbie Groups: Member
Joined: 3/12/2008 Posts: 7
|
Hi,
We have bought this control from Aspx lab before 1 and half years ago. Now we are converting our application to .net 3.5. SO we need this control. In aspx lab i have written some server side coding which is not working for eolab.
This is code in Aspx Lab. AspxLab.WebControls.MenuItem[] itemA = SlideMenu3.SearchItems(Session["SelectedMenuItem"].ToString()); AspxLab.WebControls.MenuItem item = itemA[0]; AspxLab.WebControls.MenuItem itemAuth = itemA[0];
Modified code for Eolab. EO.Web.MenuItem[] itemA =(SlideMenu3.SearchItems(Session["SelectedMenuItem"].ToString())); EO.Web.MenuItem item = itemA[0]; EO.Web.MenuItem itemAuth = itemA[0]; But this is not working.
The first line I am got error.
private string GetMenuItemPath(AspxLab.WebControls.MenuItem item) { StringBuilder builder = new StringBuilder(item.ItemHTML); AspxLab.WebControls.MenuItem pathItem = item;
int iLevel = pathItem.Level; while (iLevel != 0) { pathItem = item.ParentItem; builder.Insert(0, " > "); builder.Insert(0, pathItem.ItemHTML); iLevel--; item = pathItem; } builder.Replace("<Li>", ""); builder.Replace("</Li>", ""); return builder.ToString(); }
item.ItemHTML is not working.
These are things I had written for aspx lab. I have changed some code as per eolab but some of the properties are not working. Like ItemHtml is not working. Please go throught the code and help me on this.
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, SearchItems returns EO.Web.NavigationItem[], not EO.Web.MenuItem[]. So you will need to cast: EO.Web.NavigationItem[] itemA = (SlideMenu3.SearchItems(Session["SelectedMenuItem"].ToString())); EO.Web.MenuItem item = (EO.Web.MenuItem)itemA[0]; ItemHTML is now Text.Html, so it will be something like menuItem.Text.Html. You can check the reference section of the documentation for more details: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.htmlHope this helps. Thanks!
|