This is a migrated thread and some comments may be shown as answers.

URL in model bind menu

1 Answer 42 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jack
Top achievements
Rank 1
Jack asked on 09 Sep 2011, 09:20 PM
Hi guys.. Im with problem here,

Is there any issue with url in model bind.

Look my code
@(Html.Telerik().Menu()
        .Name("Menu")
        .BindTo(Model,(item, categoria) =>
        {
            item.Text = categoria.TXT_NomeCategoria;
            item.Url = Url.Action(categoria.TXT_Url, categoria.TXT_NomeCategoria);
        }
        )
)

And my url isnt getting categoria.TXT_URL, at preview only show me localhost/NomeCategoria

But if i change categoria.TXT_URL to a fixed text like "EDIT"

item.Url = Url.Action("EDIT", categoria.TXT_NomeCategoria);

The menu builds the url correctly. localhost/NomeCategoria/Edit

Any way to solve this or its a bug???

1 Answer, 1 is accepted

Sort by
0
Jack
Top achievements
Rank 1
answered on 14 Sep 2011, 05:32 PM
well.. after some time investigating this i solved.. not really solved.. my actions is "index" i was expecting /Index but isnt necessary..

My fault.
Tags
Menu
Asked by
Jack
Top achievements
Rank 1
Answers by
Jack
Top achievements
Rank 1
Share this question
or