зеркало из https://github.com/mono/xsp.git
Added master page tests and updated menu test.
svn path=/trunk/xsp/; revision=39579
This commit is contained in:
Родитель
586ea86542
Коммит
45f4e075fb
|
@ -1 +1 @@
|
|||
SUBDIRS = menu treeview
|
||||
SUBDIRS = menu treeview masterpages
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
samplesdir = $(datadir)/doc/xsp/test/2.0/masterpages
|
||||
samples_DATA = \
|
||||
simple.master \
|
||||
simple.aspx \
|
||||
frame.master \
|
||||
content1.aspx \
|
||||
content2.aspx
|
||||
|
||||
EXTRA_DIST = $(samples_DATA)
|
|
@ -0,0 +1,12 @@
|
|||
<%@ Page Language="C#" MasterPageFile="frame.master" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="title" Runat="server">
|
||||
Welcome to Master Pages!
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="server">
|
||||
<p>This is the content of the master page file.</p>
|
||||
<p>This sample master page has two placeholders,
|
||||
one for the content and one for the title.</p>
|
||||
<p>Click <a href="content2.aspx">here</a> to see another content page.</p>
|
||||
</asp:Content>
|
|
@ -0,0 +1,10 @@
|
|||
<%@ Page Language="C#" MasterPageFile="frame.master" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="title" Runat="server">
|
||||
Welcome again!
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="content" Runat="server">
|
||||
<p>This is another content page for the same master page file.</p>
|
||||
<p>Click <a href="content1.aspx">here</a> to see another content page.</p>
|
||||
</asp:Content>
|
|
@ -0,0 +1,23 @@
|
|||
<%@ Master Language="C#"%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>Simple Master Page</title>
|
||||
</head>
|
||||
<body bgcolor=black text=white>
|
||||
<form id="form1" runat="server">
|
||||
<span style="font-size:20px">
|
||||
<asp:contentplaceholder id="title" runat="server"></asp:contentplaceholder>
|
||||
</span>
|
||||
<table style="height:500px" width=80%><tr>
|
||||
<td width = 50px></td>
|
||||
<td style="background-color:white; color:black; padding:10px" valign="top" >
|
||||
<asp:contentplaceholder id="content" runat="server"></asp:contentplaceholder>
|
||||
</td>
|
||||
</tr></table>
|
||||
This a common page footer.
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
<%@ Page Language="C#" MasterPageFile="simple.master" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="server">
|
||||
Contents go here
|
||||
</asp:Content>
|
|
@ -0,0 +1,19 @@
|
|||
<%@ Master Language="C#"%>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<head runat="server">
|
||||
<title>Simple Master Page</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
What's inside the following box is a placeholder:
|
||||
<div style='border:solid 2px red; padding:10px'>
|
||||
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server"></asp:contentplaceholder>
|
||||
</div>
|
||||
That's all!
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -1,18 +1,11 @@
|
|||
<%@ Page Language="c#" %>
|
||||
<script runat="server">
|
||||
|
||||
void Menu1_MenuItemClick(Object s,
|
||||
System.Web.UI.WebControls.MenuEventArgs e)
|
||||
void Menu1_MenuItemClick(Object s, System.Web.UI.WebControls.MenuEventArgs e)
|
||||
{
|
||||
Label1.Text = "You selected " + e.Item.Text;
|
||||
Page.Header.Metadata ["un"] = "dos";
|
||||
Page.Header.Title = "You selected " + e.Item.Text;
|
||||
|
||||
Style st = new Style ();
|
||||
st.Width=10;
|
||||
Page.Header.StyleSheet.RegisterStyle (st, null);
|
||||
Page.Header.StyleSheet.RegisterStyle (st, null);
|
||||
Page.Header.StyleSheet.CreateStyleRule (st, "BODY", null);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -21,9 +14,10 @@
|
|||
<title>Simple Menu</title>
|
||||
<META kk="iii">
|
||||
</head>
|
||||
<body>
|
||||
<body style="background-color: #f8f8f4; padding:0; margin:0">
|
||||
<form id="form1" runat="server">
|
||||
|
||||
<table width="100%" style="height:100%"><tr>
|
||||
<td style="background: #505050; padding:10px" valign=top>
|
||||
<asp:Menu
|
||||
id="Menu1"
|
||||
StaticDisplayLevels = "1"
|
||||
|
@ -32,14 +26,19 @@
|
|||
DynamicHorizontalOffset = "5"
|
||||
DynamicVerticalOffset = "0"
|
||||
DynamicHoverStyle-ForeColor = "Green"
|
||||
StaticHoverStyle-BackColor = "Magenta"
|
||||
DynamicMenuStyle-BackColor = "LemonChiffon"
|
||||
DynamicMenuStyle-ForeColor = "gray"
|
||||
StaticHoverStyle-BackColor = "gray"
|
||||
StaticMenuStyle-ForeColor = "white"
|
||||
DynamicSelectedStyle-BackColor = "Red"
|
||||
Runat="Server">
|
||||
<DynamicItemTemplate>
|
||||
Item: <%# ((MenuItem)Container.DataItem).Text %>
|
||||
</DynamicItemTemplate>
|
||||
<DynamicMenuStyle
|
||||
BackColor = "#f8f8f4"
|
||||
ForeColor = "gray"
|
||||
BorderColor="#505050"
|
||||
BorderStyle="Solid"
|
||||
BorderWidth="1" />
|
||||
<DynamicMenuItemStyle
|
||||
HorizontalPadding="5"
|
||||
VerticalPadding="3" />
|
||||
<Items>
|
||||
<asp:MenuItem Text="Part I">
|
||||
<asp:MenuItem Text="Chapter 1" ImageUrl="http://msdn.microsoft.com/msdn-online/shared/graphics/icons/rtg_email.gif"/>
|
||||
|
@ -61,9 +60,14 @@
|
|||
<asp:MenuItem Text="Part III"/>
|
||||
</Items>
|
||||
</asp:Menu>
|
||||
|
||||
<p> </p>
|
||||
<asp:Label ID="Label1" Runat="Server" />
|
||||
</td>
|
||||
<td width="100%">
|
||||
<p align=center>
|
||||
<asp:Label ID="Label1" Runat="Server" >This is a vertical menu sample</asp:Label>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<br/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче