Unordered list created by listview not showing on hover - asp.net

I have a navigationbar that's controled completly by css ul and li.
The first unordered list contains listitems which are always displayed (General Site pages).
on hovering over the listitem (Gamma), the sublistitems appear. These sublistitems are themself in an unordered list of car models with the modelname. Hovering one of these items show me a picture of the car in a seperate div.
When I create the list of cars manually all works fine. The car models en their image are shown correctly.
When I create the unordered list dynamically by a listview. The car names are not shown.
If I place the listview out of the navigation ul. The listview works correct.
I assume it has something to do with the moment that the listview creates the unordered list. Can anyone point me in the right direction?
My ASP.net code
<nav>
<ul class="menu">
<li><a class="active" href="Default.aspx">H</a></li>
<li>Gamma
**<asp:ListView ID="lvGamma" runat="server">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li><a href='<%# "AixamGamma.aspx?Model=" + Eval("car.NewCarID").ToString %>' class="sublistitem" >
<asp:Label ID="lblModelName" runat="server" Text='<%# Eval("car.ModelName") %>'></asp:Label></a>
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h3>
<asp:Label ID="lblModelSlogan" runat="server" Text='<%# Eval("car.Slogan") %>'></asp:Label>
</h3>
</div>
<div class="grid_3">
<div class="wrapper">
<img src='<%# Eval("image.ImageLocationPath") + Eval("image.ImageFileName")%>' alt='<%# Eval("car.ModelName") %>'
class="img-max-h200-w200" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ItemTemplate>
</asp:ListView>**
*<ul>
<li>City</li>
<li>CityS</li>
<li>Crossline</li>
<li>GTO
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h2>
De nieuwe Aixam Gto</h2>
<p>
Rijden zonder rijbewijs in een sportief kleedje</p>
</div>
<!--- image width max 220px --->
<div class="grid_3">
<div class="wrapper">
<img src="images/Sliders/Aixam%20GTO.jpg" alt="Gto" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li>Crossover</li>
</ul>*
</li>
<li>Tweedehands</li>
<li>Onderhoud/herstelling </li>
<li>Wetgeving</li>
<li>Contact</li>
</ul>
</nav>
the bold part doesn't work except when its placed out the navigation list, the italic part does
thx for the help

I got it working. I've tested the code with the hard coded unordered list AND the listview together in one item. Removing the hard coded list did the trick....

Related

Deploying ASPX page with markup alone creates duplicate Content Editors

When I deploy an ASPX page with markup alone it creates duplicate Content Editors.
It's a SharePoint 2013 site, and the controls have no javascript or text attached. They're simply created in markup. Upon deployment, a new Content Editor is generated in addition to the old ones. Do I have to uniquely identify the controls beyond an id somehow to prevent this behavior? I'm working on a very old site I inherited, so maybe there's something improperly configured somewhere?
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
<div class="main-pages-content">
<div id="mainTabstrip" class="mt-4" style="width: 100%;">
<ul>
<li class="k-state-active">Current Announcements</li>
<li>FAQ</li>
<li>Research FAQ</li>
</ul>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:Blog" ID="webPartZoneCurrentAnnouncements" FrameType="TitleBarOnly">
<zonetemplate></zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:FAQ" ID="webPartZonzeFAQ" FrameType="TitleBarOnly">
<zonetemplate>
<WebPartPages:ContentEditorWebPart runat="server" WebPart="true" Title="FAQ Content Editor" ID="contentEditorFAQ" FrameType="None">
</WebPartPages:ContentEditorWebPart>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<div class="row">
<div class="col-10">
<WebPartPages:WebPartZone runat="server" Title="loc:ResearchFAQ" ID="webPartZoneResearchFAQ" FrameType="TitleBarOnly">
<zonetemplate>
<WebPartPages:ContentEditorWebPart runat="server" WebPart="true" Title="Research FAQ Content Editor" ID="contentEditorResearchFAQ" FrameType="None">
</WebPartPages:ContentEditorWebPart>
</zonetemplate>
</WebPartPages:WebPartZone>
</div>
</div>
<SharePoint:ScriptBlock runat="server">if(typeof(MSOLayout_MakeInvisibleIfEmpty) == "function") {MSOLayout_MakeInvisibleIfEmpty();}</SharePoint:ScriptBlock>
</div>
</div>
</asp:Content>

Giving a ListItem focus from the server on page load

On my aspx page I have the following list items/divs. Is there a way to make the tab in position 1 (divReferralTab) the selected tab on page load by referencing the div or the list item?
<div id="mainTabs" class="povMainTabs">
<ul id="ulMainTabs" runat="server">
<li id="liRDCTab" runat="server"><asp:Label runat="server" ID="lblRDC" /></li>
<li id="liReferralTab" runat="server">Referral</li>
<li id="liContactsTab" runat="server">Holistic/Contact</li>
</ul>
<div id="divRDCTab"></div>
<div id="divReferralTab"></div>
<div id="divContactsTab"></div>
</div>
If I understand you right, you can try setting the z-index of the control you need first.
https://www.w3schools.com/cssref/pr_pos_z-index.asp
If you want the referral "bullet" first then try just listing it first:
<div id="mainTabs" class="povMainTabs">
<ul id="ulMainTabs" runat="server">
<li id="liReferralTab" runat="server">Referral</li>
<li id="liRDCTab" runat="server"><asp:Label runat="server" ID="lblRDC" /></li>
<li id="liContactsTab" runat="server">Holistic/Contact</li>
</ul>
<div id="divRDCTab"></div>
<div id="divReferralTab"></div>
<div id="divContactsTab"></div>

Render items side by side

I am trying to display a page that contains a header with 3 list items, a sidebar with links on the left and the actual body. I would like the sidebar and the body to be rendered side by side under the header. However, they are rendered one after another on the page.
Any suggestions on how this can be done?
I've used the following code and style to achieve this, but it doesn't seem to be working.
<div>
<h1 class="control-label admin-header" style="vertical-align:top;padding-left:20px">Administration</h1>
<ul class="nav nav-pills admin-header" style="float:right">
<li class="active admin-header">test</li>
<li class="admin-header">xyz</li>
<li class="admin-header">abc</li>
</ul>
</div>
<div>
<div class="span3 admin-header">
<div class="well sidebar-nav admin-header">#RenderSection("Sidebar", false)</div>
</div>
<div class="content span12 admin-header">#RenderBody()
</div>
</div>
.admin-header
{
display: inline;
}​
Fiddle
Not sure whether I understood, but for side by side display, you can use
<table>
<tr>
<td class="active admin-header">test</td>
<td class="admin-header">xyz</td>
<td class="admin-header">abc</td>
</tr>
</table>

How can I get my table to display above my ContentPlaceHolder?

I am trying to create a menu in the MasterPage that is displayed when a hyperlink is clicked. YardimDokumaniMenuAHREF is the hyperlink that displays the menu. As you can see, a javascript is called when I click on it. However contensts of the cells can not be displayed due to contentplaceholder. Please see the screenshot.
and this is my code. can someone help me out with this?
<a id="YardimDokumaniMenuAHREF" href="javascript:DisplayMenu('ctl00_YardimDokumaniMenuContent')" runat="server" title="">YARDIM DÖKÜMANI</a>
<%-- YardimDokumaniMenuAHREF triggers YardimDokumaniMenuContent to be displayed --%>
<div ID="YardimDokumaniMenuContent" runat="server" style="visibility:hidden; position:absolute; z-index:-99999">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
hadi bakalııııım
</td>
</tr>
<tr>
<td>
hadi bakalııııım333
</td>
</tr>
</table>
</div>
</li>
<li class=""><a href="~/Default.aspx" title="Ana Sayfa" runat="server" id="AnaSayfaLink">
Ana Sayfa</a> </li>
<li class=""><a href="~/Everyone/iletisim.aspx" runat="server" title="Bilgi almak istiyorum, şikayetim var, haklı müşteriyim.">
İLETİŞİM / YARDIM MASASI</a></li>
<li class="current_page_item" runat="server" id="OnlineIslemLink"><a id="A1" runat="server"
href="https://ode.a-kent.com/Yetki/Login.aspx">ONLINE İŞLEM</a> </li>
<li class="">
<asp:LinkButton ID="LogoutLinkButton" runat="server" CausesValidation="false" OnClick="LogoutLinkButton_Click">GÜVENLİ ÇIKIŞ</asp:LinkButton>
</li>
</ul>
</div>
<!-- globalNav end -->
</div>
<!-- header end -->
<div id="main">
<div class="panel fetaured" style="left: 192px; top: 0px; width: 755px;">
<div class="comments">
<b>GERİ</b>
</div>
</div>
</div>
<div>
<asp:ContentPlaceHolder runat="server" ID="LeftPanelContentPlaceHolder">
</asp:ContentPlaceHolder>
Display menu function:
<script type="text/javascript">
function DisplayMenu(obj) {
obj = document.getElementById(obj);
obj.style.visibility = 'visible';
}
</script>
Remove the z-index:-99999from the YardimDokumaniMenuContent div style. If that doesn't work, ensure the z-index of that div is greater than the one of the background.

Html Divs going underneath another DIv Automatically

I have a couple divs and they are set up to be sepereate. but when I load the page they all go underneath the first div that is created. So the example below SiteFullControl is the first div, everything just falls underneath here when the page load. any ideas?
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
</div>
<div id="SitePartialControl" >
<partialalbum:partialalbum ID="partialcontrolalbums" runat="server" />
</div>
<div id="SiteViewOnlyAlbums" class="">
<viewonly:viewonly ID="viewonlyalbums" runat="server" />
</div>
<div id="SitePublicAlbums" class="">
<publicalbum:publicalbum ID="publicalbum" runat="server" />
</div>
<div id="SiteFavoriteAlbums" class="">
<favoritealbum:favoritealbum ID="favoritealbum" runat="server" />
</div>
<div id="SiteFriends" class="">
<friends:friends ID="friend" runat="server" />
</div>
<div id="SiteCreateAlbum" class="">
<createalbum:createalbum ID="createalbums" runat="server" />
</div>
Example of whats happen when the page load
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
I checked the css with firebug and it does not have any position for the css.
use this CSS rule, it may work:
display:block;
no more help can be given without accessing CSS properties.

Resources