Link to home
Start Free TrialLog in
Avatar of finance_teacher
finance_teacher

asked on

dynamic URL string -- asp.net mvc4 ?

Below Details.cshtml "123456" code works
How can I get below ""model.ID"" to work ?
---------------------------------------------------------------

                @Html.DisplayFor(model => model.ID)

                <img src="http://www.barcodesinc.com/generator/image.php?code=123456&style=197&type=C128B&width=200&height=50&xres=1&font=3">

                <img src="http://www.barcodesinc.com/generator/image.php?code= ""model.ID"" &style=197&type=C128B&width=200&height=50&xres=1&font=3">
Avatar of kaufmed
kaufmed
Flag of United States of America image

Put an @ in front of it.

e.g.

<img src="http://www.barcodesinc.com/generator/image.php?code=@model.ID&style=197&type=C128B&width=200&height=50&xres=1&font=3">

Open in new window

Avatar of finance_teacher
finance_teacher

ASKER

That fails, so I tried the below which also fails
How can I fix ?

                <img src="http://www.barcodesinc.com/generator/image.php?code= + @model.BillingDate + &style=197&type=C128B&width=200&height=50&xres=1&font=3">
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How can I have it be TWO values ?
---------------------------------------------------------------------------------------------------------------------
Below works, showing both values.
                <img src="http://www.barcodesinc.com/generator/image.php?code=@Model.ID@Model.IFSWO&style=197&type=C128B&width=200&height=50&xres=1&font=3">
---------------------------------------------------------------------------------------------------------------------
Below fails, trying to add a space between the values.
                <img src="http://www.barcodesinc.com/generator/image.php?code=@Model.ID" "@Model.IFSWO&style=197&type=C128B&width=200&height=50&xres=1&font=3">
Below works by just putting a space, no " " needed.

                <img src="http://www.barcodesinc.com/generator/image.php?code=@Model.ID @Model.IFSWO&style=197&type=C128B&width=200&height=50&xres=1&font=3">