Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Both @Html.ActionLink & Anchor tag aren't working bootstrap
Jimit Bhatt
May 19 2016 9:30 AM
356
Reply
I'm not getting what wrong actually is going on? In dropdown I've added @Html.ActionLink and even <a> tag. But surprisingly both are not working(i.e. On Click: no action happens).
Can any body please help me to sort it out what's wrong in my code?
Head Tag
<
head
>
<
meta
charset
=
"utf-8"
>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1"
>
<
title
>
</
title
>
<
link
href
=
"@Url.Content("
~/Content/bootstrap.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/Site.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/DropDown.css")"
rel
=
"stylesheet"
/>
<
link
href
=
"@Url.Content("
~/Content/SideMenu.css")"
type
=
"text/css"
rel
=
"stylesheet"
/>
<
script
src
=
"@Url.Content("
~/Scripts/jquery-1.9.1.min.js")"
type
=
"text/javascript"
>
</
script
>
<
script
src
=
"@Url.Content("
~/Scripts/bootstrap.js")"
type
=
"text/javascript"
>
</
script
>
</
head
>
Body Tag:
<
nav
class
=
"navbar navbar-default navbar-fixed-top"
>
<
div
class
=
"container"
>
<
div
class
=
"navbar-header"
>
<
button
type
=
"button"
class
=
"navbar-toggle"
data-toggle
=
"collapse"
data-target
=
"#myNavbar"
>
<
span
class
=
"icon-bar"
>
</
span
>
<
span
class
=
"icon-bar"
>
</
span
>
<
span
class
=
"icon-bar"
>
</
span
>
</
button
>
<
a
class
=
"navbar-brand font-color"
href
=
"#myPage"
style
=
"font-family:Georgia;"
>
Company Name
</
a
>
</
div
>
<
div
class
=
"collapse navbar-collapse"
id
=
"myNavbar"
>
<
ul
class
=
"nav navbar-nav navbar-right"
>
<
li
class
=
"dropdown"
>
<
a
href
=
"#about"
class
=
"dropbtn"
>
Company
<
span
class
=
"caret"
>
</
span
>
</
a
>
<
div
class
=
"dropdown-content"
>
@Html.ActionLink("Introduction","Introduction","Default")
<
a
href
=
"~/PDF/Objectives-of-Company.pdf"
target
=
"_blank"
>
Objectives of Company
</
a
>
<
a
href
=
"#"
>
RTI Act
</
a
>
</
div
>
</
li
>
<
li
>
<
a
href
=
"#about"
>
Reports
</
a
>
</
li
>
<
li
class
=
"dropdown"
>
<
a
href
=
"#about"
class
=
"dropbtn"
>
About Us
<
span
class
=
"caret"
>
</
span
>
</
a
>
<
div
class
=
"dropdown-content"
>
<
a
href
=
"#"
style
=
"color:#52a4d4;"
>
History
</
a
>
<
a
href
=
"#"
>
Organisation Structure
</
a
>
<
a
href
=
"#"
>
Functions of KSNDMC
</
a
>
<
a
href
=
"#"
>
Executive Committee
</
a
>
</
div
>
</
li
>
<
li
class
=
"dropdown"
>
<
a
href
=
"#about"
class
=
"dropbtn"
>
Company Data
<
span
class
=
"caret"
>
</
span
>
</
a
>
<
div
class
=
"dropdown-content"
>
<
a
href
=
"#"
style
=
"color:#52a4d4"
>
Rainfall Data
</
a
>
<
a
href
=
"#"
>
Company Data
</
a
>
<
a
href
=
"#"
>
Company Data
</
a
>
<
a
href
=
"#"
>
Company Details
</
a
>
<
a
href
=
"#"
>
Company Details
</
a
>
<
a
href
=
"#"
>
Company Details
</
a
>
<
a
href
=
"#"
>
Company Details
</
a
>
</
div
>
</
li
>
<
li
>
<
a
href
=
"#services"
>
Activities
</
a
>
</
li
>
<
li
class
=
"dropdown"
>
<
a
href
=
"#"
class
=
"dropbtn"
>
Gallery
<
span
class
=
"caret"
>
</
span
>
</
a
>
<
div
class
=
"dropdown-content"
>
<
a
href
=
"#"
>
Photo Gallery
</
a
>
<
a
href
=
"#"
>
Video Gallery
</
a
>
</
div
>
</
li
>
<
li
>
<
a
href
=
"#contact"
>
Contact Us
</
a
>
</
li
>
<
li
>
<
a
href
=
"#contact"
>
Sign In
</
a
>
</
li
>
</
ul
>
</
div
>
</
div
>
</
nav
>
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
MVC and Bootsratp
Webmail lite ASP.NET issue?