Problem Creating ComponentArt Menu for MVC

Not Answered This post has 0 verified answers and 1 reply

Not Ranked
Posts: 3
logomo Posted: Tue Apr 27, 2010 @ 12:27 PM

We're in process of migrating our site to MVC and I am working on creating a menu for our intneral customer support. I followed the documentation posted on your site.  I created the menu in a control as shown  in the code below. The I load this control in the master page as follows
<%
= Html.Action("Menu", "MainNavigation", new {area="Common"})%>
When I run the app. everything works fine except the menu does not dislay. Upon checking for sometime now I notice that the Html in
<%=Html.ComponenetArt().Menu() is underline red and there is a message saying "instance argument:Cannot convert from System.Web.Mvc.HtmlHelper<object> to System.Web.Mvc.HtmlHelper". If you have encouter this issue before, please help.
<%

@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<%

@ Import Namespace="ComponentArt.Web.UI" %>

<

 

style type="text/css">

 

ul

{

 

font-size:.8em;

 

text-align:left;

}

 

.menu_header

{

 

background-color:#ffff11;

 

border-left:solid 1px black;

 

padding:0 4px 4px 0;

}

 

 

.menu_group

{

 

float: right;

 

text-align:center;

}

</

 

style>

 

<div style="width: 100%;">

 

<div class="menu_group">

<%

=Html.ComponentArt().Menu()

.ID("Menu1")

.Items(o =>

{

o.Add().Text("File").Items(o2 =>

{

o2.Add().Text("New");

o2.Add().Text("Open");

o2.Add().Text("Close");

});

o.Add().Text("Help").Items(o2 => o2.Add().Text("About"));

})

%>

 

 

</div>

</

 

div>


Thanks

Hakim

All Replies

Top 10 Contributor
Posts: 6,476
hwan Posted: Wed Apr 28, 2010 @ 3:03 PM

I'm not aware of why this won't work, although the Html.Action() method, being an MVC 2 feature, was not tested when this HtmlHelper was released.

 

Can you post a sample code project that we can run to reproduce the issue?  Alternatively, you could open a support request and there send us the code you're using.

Page 1 of 1 (2 items)