Home Retrieve varchar as url link from SQL Server to Razor
Reply: 0

Retrieve varchar as url link from SQL Server to Razor

FromSouth
1#
FromSouth Published in 2017-11-11 07:01:25Z

I'm trying to retrieve a varchar from SQL Server to create an Url.Action in Razor asp.net.

The SQL cell looks like this:

"Index","Contact"

The code in the razor view looks like this:

href=@Url.Action(carousel.Link)

The result in the browser looks like this:

href="/Home/%22Index%22%2c%22Contact%22"

The desire result is:

href="/Contact"

Any ideas of how to escape those weird characters?

Thanks in advance.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.376081 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO