|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using SkinID for Menu background image.Hi,
I am using dot net 2.0. It is with a new tag - MENU. Also THEMES are available. I have defined four themes BLUE, RED, GREEN & KHAKI. Under every theme one skin file is defined. Inside every skin file, various SkinID's are defined that points to images related to that theme. If I have to include that image inside my page, I use "asp:Image ID=imgTopLogo SkinID=TopLogo runat=server" kind of code. Now, I want to use SkinID element to set the background to the asp:menuitem tag. I am unable to find the property of MENU tag where I can assign that SkinID. Please help me in this. my email id is kiran_more_***@yahoo.com Kiran In your .skin file for the Menu (ex: Menu.skin), you define the background
and other characteristics of MenuItems based on the Menu tag itself: --- <asp:Menu runat="server" SkinId="redMenu"> <StaticMenuItemStyle ... /> <DynamicMenuItemStyle ... /> <DynamicHoverStyle ... /> <StaticHoverStyle ... /> </asp:Menu> --- Then call that from your presentation page: --- <asp:Menu ID="myMenu" runat="server" SkinID="redMenu"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home Page" Value="Home Page" /> </Items> </asp:Menu> --- or programatically assign it in codebehind prior to the page's generation: --- protected void Page_PreInit(object sender, EventArgs e) { myMenu.SkinID = "redMenu"; } --- -dl --- David Longnecker Web Developer http://blog.tiredstudent.com Show quoteHide quote > Hi, > > I am using dot net 2.0. It is with a new tag - MENU. Also THEMES are > available. > > I have defined four themes BLUE, RED, GREEN & KHAKI. Under every theme > one skin file is defined. Inside every skin file, various SkinID's are > defined that points to images related to that theme. > > If I have to include that image inside my page, I use "asp:Image > ID=imgTopLogo SkinID=TopLogo runat=server" kind of code. > > Now, I want to use SkinID element to set the background to the > asp:menuitem tag. I am unable to find the property of MENU tag where I > can assign that SkinID. > > Please help me in this. > my email id is > kiran_more_***@yahoo.com > Kiran > its not that much easy....
i have defined on class inside the css file and used that as CSSClass for StaticMenuItemStyle tag. kiran more
FileUpload control - file size detection
"Failed to load viewstate" when clicking button Error Loading UserControl Get value from textbox in webcontrol Javascript from treeview Paging in DataGrid does not work 2.. Folder creation error: "Could not find a part of the path" error Validation summary always does postback...even if clientside enabl Need very very good web designer contractor (ASP.NET 2.0 themes) Retrieve value from textbox in webusercontrol |
|||||||||||||||||||||||