![]() |
ASP.NET 2.0 + C#: Menu wie bei MS?
Hi DP :hi: ,
Ich bin zur Zeit eine HP am schreiben, wo ich das MS VisualStudio 2005 Standart verwende. Ich habe dort nun eine Web.sitemap-Datei und eine Masterpage, auf der ich ein "Menu"(Rubrik Navigation) habe. allerdings zeigt es die ganze Zeit nureinen Punkt dort an, die anderen muss man durch draufgehen mit der Maus ausklappen(hat so nen Pfeil). Wie kriege ich es nun hin, wie auf der MS-Homepage viele Punkte untereinander zu bekommen? [edit]Vielleicht doch besser verschieben ;) [/edit] |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
*push*
|
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *push* :hi:
Hat wirklich keiner eine Ahnung? :gruebel: |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
Zeige mal bitte den Code Deiner ASP.NET Seite her. Speziell die Definition Deiner Navigation. Außerdem bitte die Web.Config und die Web.Sitemap (nutze die XML-Tags der DP) :)
...:cat:... |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
Also:
Web.sitemap
XML-Code:
Web.Config des roots:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/Default.aspx" title="Home" description=""> <siteMapNode url="~/Home/News/Default.aspx" title="News" description=""> <siteMapNode url="~/Home/News/Öffentliche News/Default.aspx" title="Öffentliche News" description="" /> <siteMapNode url="~/Home/News/Interne News/Default.aspx" title="Interne News" description="" /> </siteMapNode> <siteMapNode url="~/Home/Termine/Default.aspx" title="Termine" description=""/> <siteMapNode url="~/Home/Kontakt/Default.aspx" title="Kontakt" description=""/> <siteMapNode url="~/Home/Über/Default.aspx" title="Über" description=""/> <siteMapNode url="~/Home/Intern/Intern.aspx" title="Intern" description=""/> </siteMapNode>
XML-Code:
MasterPage.master:
<?xml version="1.0"?>
<!-- Hinweis: Alternativ zur manuellen Bearbeitung dieser Datei können Sie auch mit dem Webverwaltungstool die Einstellungen für Ihre Anwendung konfigurieren. Verwenden Sie die Option "Website->ASP.NET-Konfiguration" in Visual Studio. Eine vollständige Liste aller Einstellungen und Kommentare befindet sich in "machine.config.comments", im Allgemeinen unter "\Windows\Microsoft.Net\Framework\v2.x\Config". --> <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"> <appSettings/> <connectionStrings/> <system.web> <!-- Legen Sie beim Kompilieren debug="true" fest, um Debugsymbole in die kompilierte Seite einzufügen. Da dies die Leistung beeinträchtigt, sollte der Wert nur beim Entwickeln auf "True" gesetzt werden. --> <roleManager enabled="true" /> <compilation debug="true"/> <!-- Der Abschnitt <authentication> ermöglicht die Konfiguration des Sicherheitsauthentifizierungsmodus, mit dem ASP.NET eingehende Benutzer identifiziert. --> <authentication mode="Forms" /> <!-- Der Abschnitt <customErrors> ermöglicht die Konfiguration der Vorgehensweise bei unbehandelten Fehlern während der Anforderungsausführung. Insbesondere können Entwickler HTML-Fehlerseiten konfigurieren, die anstelle einer Fehlerstapelüberwachung angezeigt werden. <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> <error statusCode="403" redirect="NoAccess.htm" /> <error statusCode="404" redirect="FileNotFound.htm" /> </customErrors> --> </system.web> </configuration>
Code:
(Formatierung ist von VS)
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>*********</title> </head> <body style="background-color: turquoise;"> <form id="form1" runat="server"> <div style="left: 0px; width: 200px; position: absolute; top: 0px; height: 200px"> <asp:Image ID="Image1" runat="server" Height="200px" Width="200px" style="background-color: transparent" ForeColor="White" ImageUrl="~/SV-Logo.bmp" TabIndex="2" /></div> <div style="left: 0px; width: 210px; position: absolute; top: 200px; height: 374px; background-color: #e3eaeb;"> <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Style="left: 0px; width: 210px; position: absolute; top: 0px; background-color: #e3eaeb;" Width="199px" BackColor="#E3EAEB" DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#666666" StaticSubMenuIndent="10px"> <StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <DynamicHoverStyle BackColor="#666666" ForeColor="White" /> <DynamicMenuStyle BackColor="#E3EAEB" /> <StaticSelectedStyle BackColor="#1C5E55" /> <DynamicSelectedStyle BackColor="#1C5E55" /> <DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" /> <StaticHoverStyle BackColor="#666666" ForeColor="White" /> </asp:Menu> <asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ImageSet="Arrows" Style="left: 0px; position: absolute; top: 22px" Width="210px" Height="170px" ExpandDepth="1" Font-Names="Verdana"> <ParentNodeStyle Font-Bold="False" /> <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" /> <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px" VerticalPadding="0px" /> <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="0px" /> </asp:TreeView> <div style="width: 210px; left: 0px; position: absolute; top: 191px; height: 109px;"> <asp:LoginView ID="LoginView1" runat="server"> <AnonymousTemplate> <asp:Login ID="Login1" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#333333" RememberMeText="Daten speichern." UserNameLabelText="Name:" Width="200px" CreateUserText="Registrieren" CreateUserUrl="~/Home/User/Register.aspx"> <TitleTextStyle BackColor="#507CD1" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /> <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> <TextBoxStyle Font-Size="0.8em" /> <LoginButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284E98" /> </asp:Login> </AnonymousTemplate> <LoggedInTemplate> <span style="font-size: 0.8em; font-family: Arial"><span style="font-family: Verdana"> Du bist eingelogt als</span> </span> <asp:LoginName ID="LoginName1" runat="server" Style="font-size: 0.8em; font-family: Arial, Fantasy" Font-Names="Verdana" /> <span style="font-size: 0.8em; font-family: Arial">. </span> <asp:LoginStatus ID="LoginStatus1" runat="server" Style="font-size: 0.8em; font-family: Arial, Fantasy" Font-Names="Verdana" /> </LoggedInTemplate> </asp:LoginView> </div> </div> <div style="width: 600px; height: 20px; font-size: small; left: 200px; font-family: Arial, Fantasy; position: absolute; top: 200px; text-align: right;"> <span style="font-size: 0.8em; font-family: Verdana"> Du bist hier: </span> <asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana"> </asp:SiteMapPath> <span style="font-size: 0.8em; font-family: Verdana"></span> </div> <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" /> <div style="left: 200px; width: 600px; position: absolute; top: 0px; height: 200px"> <asp:Image ID="Image2" runat="server" Height="200px" Width="200px" style="background-color: transparent; left: 0px; width: 600px; position: absolute; top: 0px; height: 200px;" ForeColor="White" ImageUrl="~/SV-Logo-2.2.bmp" TabIndex="2" /> </div> <div style="width: 590px; left: 210px; position: absolute; top: 220px;"> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> <span style="font-family: Verdana"><span style="font-size: 0.65em"> </span></span><div> </form> </body> </html> [edit]Fast alles hochgeladen(DB fehlt ;) )[/edit] [edit=2]Doch besser rausnehmen ;)[/edit] |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *push* :hi:
Weiß wirklich auch so niemand weiter? Ich hoffe das ist selbsterklärend. [edit] Hab grad gesehen, wenn man auf das Menu des Menu im Entwurf geht und dort von Statisch auf dynamisch stellt, sieht man es zumindest im Entwurf, aber nicht im Browser. Aber nur auf der Masterpage. [/edit] |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *push* :hi: |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *PUSH* :hi: |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *PUSH* :hi: Keiner ne Idee? :( |
Re: ASP.NET 2.0 + C#: Menu wie bei MS?
:hi: *push* :hi: |
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:09 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz