Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
5
Answers
How to add image in @Html.ActionLink , ASP.Net MVC
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Vijay
9y
6.3k
1
Reply
I am trying add image in @Html.ActionLink using ASP.Net MVC
MVC Code:
@Html.ActionLink(linkText: "Image Text", actionName: "Index", controllerName: "Home", routeValues: null, htmlAttributes: new { @class = "addimg" })
CSS:
.addimg {
background-image: url("/assets/images/img3.png");
background-repeat: no-repeat;
width: 348px;
height: 65px;
}
what mistake am doing in code? without linktext cant create a ActionLink
Please give suggestions...
Thanks
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
How to handle unauthorised url redirect to error page
ASP.NET Web Application