1
Vote

ActionLink doesn't work when I use zen barcode framework

description

I'm using zen barcode framework in a MVC 5 application. I have added Zen Barcode Rendering Framework by NuGet. I have changed my router as
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
        routes.MapMvcAttributeRoutes();
        routes.Add(
            "BarcodeImaging",
            new Route(
                "Barcode/{id}",
                new BarcodeImageRouteHandler()));
        routes.MapRoute(
            name: "Default",
            url: "{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
        );
When I try to use @Actionlink, i.e.
@Html.ActionLink("Back to List", "Index","Orders")
it work fine if and only if there are no parameters in the container page of actionlink If there is a parameter in the page container, the ActionLink produce the following url:
/Barcode/2?action=Index&controller=Orders
where 2 is the paramenter of container page.

Anyone could help me. Thanks in advance.

comments

LLIAMAH wrote Mar 30 at 12:36 PM

Same shit.
Added as described - shows empty page with address:
http://localhost:54071/Barcode/1?action=[action]&controller=[controller]

Need detailed example or description

LLIAMAH wrote Mar 30 at 12:48 PM

Has to add, that my situation reproduced if you describe reference for barcode via PartialView. Full view - works fine.

LLIAMAH wrote Mar 30 at 1:04 PM

Hmpf. additional info
The result of
routes.Add(
"BarcodeImaging",
    new Route(
        "Barcode/{id}", new BarcodeImageRouteHandler()));
Overwrites standard route and any View with parameter is not possible anymore: makes routing to Barcode/[<this_is_parameter>]?action=[action]&controller=[controller]

It is required to rework routing some way.