c# - Client template not working with custom helper action methods -


I am using RVC view engine with MVC teleicent control and ASP.NET MVC3. For example, I have my helpful supporting methods, for example:

  public static object category editing (this is UrlHelper urlHelper, int classId) {new {controller = "category", action = " Edit "id = categoryId}" }   

I have an AJAX grid and I have my own column template, there is a link by going to Action Action Method in the Country Controller, but I do not know how to display it Be done correctly I currently have this but it is not working:

  column.Bound (x = & gt; x.Id) .client template ("& lt; a href = \" " + Url.RouteUrl (URLCategoryEdit (Int32.Parse ("& lt; # = Id # & gt;")))) "Edit">   

When the grid loads, it gives the following exception:

The input string was not in the correct format.

So I'm assuming that is int32.Parse ("& lt; # = Id #>") is incorrect.

try this:

  public static object category edit (this URLpler URL Helper, String CharacterID) {new {controller = "category", action = "edit", id = categoryId}; } Column.Bound (x = & gt; x.Id) .client template ("& lt; a href = \" + + Url.RouteUrl (Url.CategoryEdit ("& lt; # = Id #>")) "" & Gt; edit & lt; / a & gt; "). Title ("Action"). With (50);    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -