Use below css.
.list-inline {
list-style: none;
padding: 0;
}
list-pipe > li {
text-align: center;
color: #11A8A1;
}
.list-inline > li {
float: left;
width: 150px;
text-align: center;
}
.list-caption {
list-style: none;
padding: 0;
clear: left;
}
.list-caption > li {
text-align: center;
float: left;
width: 150px;
}
Вот еще один способ использования Visual Studio: если вы сделаете новый элемент в Visual Studio и выберете веб-форму, она создаст автономную веб-форму * .aspx, которая у вас есть для текущего веб-форма (это то, что вы сделали?). Вам нужно выбрать форму веб-содержимого, а затем выбрать главную страницу, которую вы хотите прикрепить к ней.
Your web form shouldn't have all of that markup (like the tag). Since it has a master page, you just start with the content tag. Your aspx page should look like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebUI._Default" MasterPageFile="~/Site1.Master" %>
<asp:content id="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
This is the body!
</asp:content>
When you're adding a new aspx page make sure to check "select master page" in the "add new item" dialog.
Your web form should look like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebUI._Default" MasterPageFile="~/Site1.Master" %>
<asp:Content runat="server" ID="head" ContentPlaceHolderId="head">
<!-- stuff you want in >head%lt; -->
</asp:Content>
<asp:Content runat="server" ID="content" ContentPlaceHolderId="ContentPlaceHolder1">
<h1>Your content</h1>
</asp:Content>
Note that there is no tag
Когда вы создавали WebForm, выбирали ли вы главную страницу, к которой она прикреплена, в самом диалоге «Добавить новый элемент»? Или вы прикрепили его вручную с помощью атрибута MasterPageFile
директивы @Page
? Если бы это было последнее, это могло бы объяснить сообщение об ошибке, которое вы получаете.
VS автоматически вставляет определенную разметку в каждый тип страницы. Если вы выберете MasterPage во время создания самой страницы, она не создаст никакой разметки, кроме объявления @Page
и элемента управления содержимым верхнего уровня.
For some reason, there is no option in the create page dialogue to select a master page. I have tried both programatically declaring the MP and by updating the property in the Properties pane. – NoCarrier 13 mins ago
I believe its because i'm using a "web application" vs a "web site" – NoCarrier 9 mins ago
Chances are it is in the <@PAGE> tag where your problem is. That said, it doesnt make a difference if you are using a Web Application or not. To create a Child Page, right click on your master page in the Solution Explorer and choose Add Content Page.