TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
-------
NA
213
6.9k
link is not work inside the card
Oct 14 2020 1:41 AM
I am trying to move on service page using viewbag link
I get a viewbag text successfully but not get the link
HomeController.cs
[HttpGet]
public
ActionResult Service()
{
ViewBag.text =
this
.ControllerContext.RouteData.Values[
"action"
].ToString();
//get the action name
ViewBag.link =
"https://localhost:44349/Home/Service"
;
return
View();
}
Service.cshtml
<a style=
"color:black;"
href=
"@ViewBag.link"
>@ViewBag.text</a>
//link is perfectly work out side the card
<div
class
=
"card"
style=
"width: 80rem;margin-top:120px;margin-left:120px;"
>
<div
class
=
"row"
>
<div
class
=
"card-img-overlay d-flex"
>
<img src=
"~/Graphics/homeiconservicepage.svg"
style=
"width:25px;height:25px;"
/>
//link is not work inside the card that is issue
<a style=
"color:white;"
href=
"@ViewBag.link"
>@ViewBag.text</a>
</div>
see the console log view page source:
help
Reply
Answers (
2
)
MVC 5, Entity Framework 6 and Many to Many Relationship
how to do WhatsApp integration in .net core