I have a project in Visual Studios 2017 with this block of code in it. I just went to remake it in on my work computer (running 2015). Is there a reason why the middle two links don't work anymore?
The code doesn't even turn purple in the IDE. The top screenshot is from my laptop, the bottom screenshot is from my work computer (where the trouble is) https://gyazo.com/2968018e89c24748d48cb2291dce50d3?token=e038af6931608caede27c103a0365184
<div class="col-sm-6">
<div class="well well-sm" style="background-color:lightcyan">
<h4>AVAS for Opperations</h4>
<div class="list-group">
AVAS Time-Space Chart <img src="https://cdn1.iconfinder.com/data/icons/education-set-4/512/information-512.png" class="w3-round" alt="Denmark" style="width:3%">
History by Bus/Run/Operator <img src="https://cdn1.iconfinder.com/data/icons/education-set-4/512/information-512.png" class="w3-round" alt="Denmark" style="width:3%">
<a asp-area="" asp-controller="Home" asp-action="Legal" class="list-group-item" data-toggle="tooltip" title="(Make a list of stops and timepoints for a bus for an hour)">Bus-Hour History <img src="https://cdn1.iconfinder.com/data/icons/education-set-4/512/information-512.png" class="w3-round" alt="Denmark" style="width:3%"></a>
<a asp-area="" asp-controller="Home" asp-action="Legal" class="list-group-item" data-toggle="tooltip" title="(Make a list of buses passing a selected stop)">Bus-Stop History <img src="https://cdn1.iconfinder.com/data/icons/education-set-4/512/information-512.png" class="w3-round" alt="Denmark" style="width:3%"></a>
</div>
</div>
</div>
Maybe you are missing Razor Language Services.
Check this question.
Related
I've got a MVC core 2 project that works fine on my development server. Once I publish it to the production server, I can't get any of my buttons to work. I can navigate to all of the pages, my Javascript and JQuery seem to work fine, but if there is a button, it will not fire upon being clicked. To be clear, navigation buttons, input buttons (or buttons used for navigation, input, etc.) will not work.
I'm thinking I'm missing some sort of library (bootstrap?), but not sure. Any ideas of what or how to go about finding what?
UPDATE
I deleted and uploaded everything again and that took care of my input buttons not working (must have had some old files left in the root); however, I still can't get my navigation buttons to work. I don't get any errors when I click on them that I can see and below is my nav code:
<div class="btn-group">
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data- toggle="dropdown" aria-haspopup="true" aria-expanded="false">
DropDownTest<span class="caret" style="background-color:transparent;"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
<li><a asp-area="" asp-controller="Home" asp-action="Something1">Something1</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Something2">Something2</a></li>
..etc
</ul>
</div>
Currently in the process of learning MVC and I think it's interfering with HTML code. I have just a basic navigational menu as a list and two <li> items seem to combine into one. Any way to make sure the two are separated when live?
#if ((Request.Url.AbsolutePath.ToString().ToLower() != "/home/index") && (Request.Url.AbsolutePath.ToString() != "/"))
{
<nav data-spy="affix" data-offset-top="500" style="border-radius:0px; left: 0" ng-hide="sideBar" id="nav">
<img src="~/Content/images/open.png" ng-model="sideBar" id="sideBarOpen" style="left:0px; top:0;"/>
<div id="sideBar" style="left: -200px">
<ul>
<li> Home </li>
<li><br /></li>
<li>About Me</li>
#############
<li>Experience</li>
<li>Resume</li>
############ These two seem to be recognized as 1 <li> and not two.
<li>Contact</li>
</ul>
<img src="/Content/images/myPic.jpg" />
</div>
</nav>
<div id="sideBarBack" style="width:0%;">
</div>
}
Youre missing a quotation mark in the id="> part. This is not a valid html so your wen browser tries to workaround that resulting in the two elements combined.
To fix that instead of:
<li>Experience</li>
use a correct tag attribute id="":
<li>Experience</li>
I have added bootstrap to my application and when i wrote
<div class="container-fluid">
<div class="row" ng-repeat="user in users " style="border: 1px solid black"
ng-click="goToUserDetails(user.Id)">
<div class="col-md-4 text-center">{{user.Email}}</div>
<div class="col-md-4 text-center">{{user.Name}}</div>
<div class="col-md-4 text-center">{{user.Password}}</div>
<div class="col-md-4 text-center">
<span class="glyphicon glyphicon-trash" ng-click="delete(user.Id);$event.stopPropagation();">
</span>
</div>
</div>
<button class="btn btn-danger" ng-click="gotoAddUser()">Add</button>
</div>
It works , but when I want to add a card
<div class="card">
<img class="card-img-top" data-src="..." alt="Card image cap">
<div class="card-block">
<h4 class="card-title">Card title</h4>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
Button
</div>
</div>
It doesn't recognize the bootstrap "card" classes (the btn works )
Can someone help me pls?
There is no default Card design in Bootstrap 3.3.6 or lower version.
So now we have only two option for design card.
The standard way is Upgrade your Bootstrap version like move 3.3.6 or lower to Bootstrap 4. Bootstrap 4 Card
--- OR ---
Write your own stylesheet for card design if you want your card design same as well as Bootstrap common design then you can pick that CSS from Bootstrap 4 Card. In this case you can just pick those design which was you actually need for your Card no any other extra CSS so it will not effect your other sections or modules.
I am new ASP.NET WebForms developer and I am using ASP.NET 4.5. I am struggling right now with developing the menu. I am using Bootstrap as the main style for the UI of my application. Also, I would like to keep using the normal HTML ul tags for developing this menu. However, I am struggling now with configuring the links in this menu.
The website navigation is as follows:
Home
About
Contact
Admin > Service Management
> User Managment
The first three pages; home, about and contact are under the same folder called Pages. Under Pages folder, there is another folder called Admin. This folder includes ServiceManagement and UserManagement pages. The problem which I am struggling with is that when the user is browsing ServiceManagement or UserManagement and he clicks on the link to Home page from the top menubar, he will got an error and the link will look like the following:
http://localhost:61090/Pages/Pages/About.aspx
Here's the code of the Menu:
<div class="container">
<nav class="navbar navbar-default">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".js-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img src="../Assets/images/logo.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse js-navbar-collapse">
<ul class="nav navbar-nav">
<li>Home</li>
<li>About</li>
<li>Contact</li>
<li class="dropdown mega-dropdown">
Admin <span class="fa fa-angle-down"></span>
<ul class="dropdown-menu mega-dropdown-menu row">
<li class="col-sm-3">
<ul>
<li class="">
Service Management</li>
<li class="">User Management</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<!-- /.nav-collapse -->
</nav>
</div>
So how can I resolve this issue?
Change your HTML markup from:
About
To
<asp:HyperLink ID="lnkAbout" runat="server" Text="About" NavigateUrl="~/Pages/About.aspx"></asp:HyperLink>
The key point to take from this, is that the NavigateUrl property uses a path relative to the root of your web application ~/. This makes it simple to reference pages/content from your ASPX pages etc.
HTML based approach
You could try to set the following in your Admin HTML files.
<HEAD>
<!-- Removed for brevity -->
<BASE href="http://yourURL/Pages/Admin">
<!-- Removed for brevity -->
</HEAD>
I am not 100% certain on this one so you will need to try it on your own (in the ServiceManagement and UserManagement pages only).
Place the attribute runat="server" inside the <a> tag.
For your href value, start with "~/" to identify the application root. See ASP.NET Web Site Paths.
e.g. <a runat="server" href="~/Pages/About.aspx">About</a>
You can also use the same format to link your image file:
e.g. <img runat="server" src="~/Assets/images/logo.png" alt="">
i have some html code as follows, which was supplied by our graphics developers. the issue is when i import this into asp.net (c#) page i get to see a lot of orphan divs. it feels as if there are not opening divs for several of the closing divs. following is code snippet.
<div class="col-lg-2 col-lg-3 quick-launch">
<div class="thumbnail">
<a href=""> <img src="assets/img/app_images/app_7.jpg" width="115" height="114">
<div class="caption">
<h3>TEST</h3>
</a></div>
</div>
</div>
could someone here please let me know if there is something in visual studio that is causing this?
You're inverting <div> and <a> closing tags. This is valid HTML (but not valid XHTML so you'd better to check your DOCTYPE) but it may confuse Visual Studio editor:
<a href=""> <img src="assets/img/app_images/app_7.jpg" width="115" height="114">
<div class="caption">
<h3>TEST</h3>
</a>
</div>
a
Should be:
<a href=""> <img src="assets/img/app_images/app_7.jpg" width="115" height="114">
<div class="caption">
<h3>TEST</h3>
</div>
</a>
Edit: what's wrong with that? It works because HTML parser doesn't complain about <a><div><a/></div> (if DOCTYPE isnt XHTML) but you should complain about it. Let me explain: parser won't complain because </div> (closing tag) isn't optional then it won't just silently add it. This is theory, in practice browsers handle this in many ways. Some of them silently close <div> when </a> is reached (then </div> will close outer one), some others don't do it (I repeat because it's not an optional closing tag) then </div> will close inner (and right) one. IMO With such unreliable behavior you should ask your developer/graphics designer to fix that code. In general (and with few exceptions like <hr> and <br>) I would write HTML code as it was XHTML.