hI am having some trouble with this asp.net template. I tried Text-decoration: none but it didn't work.
<telerik:RadListView ID="NewsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="ItemsContainer" runat="server" />
</ul>
</LayoutTemplate>
<ItemTemplate>
<li style="list-style-type:none;" data-sf-provider='<%# Eval("Provider.Name")%>' data-sf-id='<%# Eval("Id")%>' data-sf-type="Telerik.Sitefinity.News.Model.NewsItem">
<h2 style="font: 13px Verdana; color:black; text-decoration:none;">
<sf:DetailsViewHyperLink TextDataField="Title" ToolTipDataField="Description" data-sf-field="Title" data-sf-ftype="ShortText" runat="server" />
</h2>
<span style="font:8px Verdana" >
<sf:FieldListView ID="summary" runat="server" Text="{0}" Properties="Summary" WrapperTagName="div" EditableFieldType="ShortText"/>
</span>
</li>
</ItemTemplate>
</telerik:RadListView>
<sf:Pager id="pager" runat="server"></sf:Pager>
Both the color of the link, and the Underline are still staying. how can i change that?
this is the result:
Give your H2 a class name. lets say "link_holder". then in your CSS try something like
h2.link_holder a
{
text-decoration:none;
}
Also, can you give the sf:DetailsViewHyperLink a CssClass?
Related
I want to show some scrolling(marquee) link in my Website form to
display data I am using repeater control.but when i am trying to give
marquee to the repeater it doesn't give me output How I give marquee
Please help. My code:
<div id="calendar1">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:CBMIAConnectionString %>"
SelectCommand="SELECT Event FROM [Home_EventLink]"></asp:SqlDataSource>
<table id="Head_Meeting">
<tr>
<td style="font-size: large; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-transform: capitalize; color: white;">  <i class="fas fa-calendar-alt" style="font-size: 25px; color: white"></i>  Upcoming Meetings</td>
</tr>
</table>
<br />
<div id="Meeting_Event" padding-left="5px" padding-right="5px">
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" class="hyperlink" Text='<%# Eval("Event") %>' href="home.aspx" runat="server" /><br />
</ItemTemplate>
<SeparatorTemplate>
<hr />
</SeparatorTemplate>
</asp:Repeater>
</div>
</div>
THIS MAY HELP
<marquee id="MyMovingText" style="width: 80%" scrollamount="5" onmouseover="stop();" onmouseout="start();" runat="server" direction="left">
<asp:datalist RepeatDirection="Horizontal" ID="rptbreaknews" runat="server">
<ItemTemplate>
<a class="readmore" target="_blank" href='<%#"details.aspx?Id="+Eval("Id") %>'>
<h3><asp:Label ID="lbltext" Text='<%#Eval("NewNewsTitle") %>' runat="server"></asp:Label></h3>
</a>
</ItemTemplate>
</asp:datalist>
</marquee>
You can use marquee like this. And do not use class and href within an aspnet Control but use the correct properties like CssClass and NavigateUrl
<marquee id="MyMovingText" direction="left" scrollamount="10">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<div class="scroll-item">
<asp:HyperLink ID="HyperLink1" CssClass="hyperlink" Text='<%# Eval("Event") %>'
NavigateUrl="/home.aspx" runat="server" />
</div>
</ItemTemplate>
</asp:Repeater>
</marquee>
<style>
.scroll-item {
float: left;
margin-right: 50px;
}
</style>
I use JQuery ThickBox 3.1 , and here is my code
<telerik:RadListView runat="server" ID="myDataList" AllowPaging="true"
DataKeyNames="id" ItemPlaceholderID="PlaceHolder1"
NeedDataSource="list_DataRebind">
<LayoutTemplate>
<div class="sushibar">
<asp:Panel ID="SushiPanel" runat="server">
<div class="sushi">
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
</div>
<telerik:RadDataPager ID="RadDataPager1" runat="server" PageSize="4" PagedControlID="myDataList">
<Fields>
<telerik:RadDataPagerButtonField />
<telerik:RadDataPagerPageSizeField />
<telerik:RadDataPagerSliderField />
</Fields>
</telerik:RadDataPager>
</asp:Panel>
</div>
</LayoutTemplate>
<ItemTemplate>
<div class="imageDiv">
<span style="margin-bottom: 5px; display: block; color: #FF6600; font-weight: bold;">
<%#Eval("Title") %></span>
<br />
<a href='<%#Eval("ImagePath")%>' title='<%#Eval("Title")%>' class="thickbox" >
<img src='<%#Eval("ImagePath")%>' alt="Single Image" width="150px" height="200px" /></a></div>
</ItemTemplate>
</telerik:RadListView>
Popup box with Image and Title show correctly , but I have another field(<%#Eval("Description")%>) to show with it !
I found how to show Inline Content in Thickbox ,
<input alt="#TB_inline?height=300&width=400&inlineId=myOnPageContent" title="add a
caption to title attribute / or leave blank" class="thickbox" type="button" value="Show" />
<a href="#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true"
class="thickbox">Show hidden modal content.</a>
But I don't know how to use this in a ListView !
:D , I found the answer ! Just put the contents ( Image + Description ) to hidden division (style with Display:none) and set this div id to inlineId .
<ItemTemplate>
<div class="imageDiv">
<span style="margin-bottom: 5px; display: block; color: #FF6600; font-weight: bold;">
<%#Eval("Title") %></span>
<br />
<div id="popUpRegion" style="display: none">
<img src='<%#Eval("ImagePath")%>' alt="Single Image" width="500px" height="600px" />
<p>
<%#Eval("Description")%></p>
</div>
<a href="#TB_inline?height=800&width=600&inlineId=popUpRegion" title='<%#Eval("Title")%>'
class="thickbox">
<img src='<%#Eval("ImagePath")%>' alt="Single Image" width="150px" height="200px" /></a></div>
</ItemTemplate>
I have the following code in ASP.NET.
The problem is that this HyperLink(hpRecord) works for all surface of "posts_listDiv" other than the two images which are not clickable in IE 9.
I tested that code and works fine in all browsers other than Internet Explorer.
<asp:Repeater ID="RepeaterCategories" runat="server">
<ItemTemplate>
<asp:HyperLink ID="hpRecord" runat="server" NavigateUrl='link'>
<div id="posts_listDiv" class="posts_listDiv">
<div id="pict1Div" class="pict1Div">
<asp:Image ID="picture" runat="server" Width="100px" Height="80px" ImageUrl='link'/>
</div>
<div id="pict2Div" class="pict2Div">
<asp:Image ID="pict2" runat="server" Width="100px" Height="80px" ImageUrl='link'/>
</div>
<div id="detailsDiv" class="detailsDiv">
<%--text--%>
<%# Eval("...")%>
<br />
<%--by user--%>
<i style="color:blue"><%# Eval("FirstName") %> </i>
</div>
</div>
</asp:HyperLink>
</ItemTemplate>
</asp:Repeater>
and this is CSS for "posts_listDiv":
.posts_listDiv
{
background-color:red;
margin-left:5px;
float:left;
width:232px;
height:171px;
word-wrap: break-word;
font-size:14px;
margin-left:8px;
margin-top:10px;
}
Add a style to "posts_listDiv" parent div.
.parent {
display: block;
}
I trying to publish my app from my own PC to the server "C:\Development\MyApp"
Everything works fine on my PC but when I publish the application the server my MasterPage looses all the images for the header... It also has problems with tabs when I click on a tab it tells me that the path is incorrect and that Folder/File does not exist.
Here is my code from the master file I don't see anything out of ordinary that could be causing this issue I hope you do :).
<div id="topContant"
style="background-image: url('/App_Themes/Sugar2006/images/Header.jpg')">
<table cellspacing="0" cellpadding="0" border="0"
style="height: 80px; width: 100%;">
<tr>
<td height="60" rowspan="1">
<img alt="" class="style1"
src="/App_Themes/Sugar2006/images/assisted-living-concepts.gif" />
</td>
<td align="left" valign="top" nowrap class="style2" style="padding-right: 10px;">
<asp:Label ID="WelcomeUser" runat="server" Text="Welcome: " ForeColor="White"></asp:Label>
<br />
<asp:HyperLink ID="lnkMyAccount" Text="My Account"
NavigateUrl="~/Users/MyAccount.aspx" style="color:White" CssClass="myAreaLink"
Runat="server" Font-Size="Small" />
|
<%
if (CPDManagement._code.Security.IS_ADMIN) {
%>
<asp:HyperLink ID="lnkAdmin" Text="Admin"
NavigateUrl="~/Administration/default.aspx" style="color:White"
CssClass="myAreaLink" Runat="server" Font-Size="Small" />
<%
%>
|
<%
}
%>
<asp:HyperLink ID="lnkAbout" Text="About" NavigateUrl="~/Home/About.aspx"
style="color:White" CssClass="myAreaLink" Runat="server" Font-Size="Small" />
<%--<br><%= Application["CONFIG.platform_title"] %>--%>
</td>
</tr>
</table>
</div>
<div id="navcontainer"
style="border-style: outset; border-width: thin; background-color: #663300; height: 30px; ">
<ul id="navlist">
<li runat ="server" id="Home"> <a id="current" href="/Home/Home.aspx" title="Home"><span>Home</span></a></li>
<%--<li runat ="server" id="Tab2"> <span>Tab 2</span></li>--%>
</ul>
</div>
<div>
The its failing to display "App_Themes" and also fails to reference to href="/Home/Home.aspx" when clicked on the Home button.
I have tried placing a "~" before the "/" or removing the "~" and "/" and nothing.
Any ideas?
In case you need to resolve path in non-server tags, use ResolveUrl:
<li runat ="server" id="Home"> <a id="current" href='<%= ResolveUrl("~/Home/Home.aspx") %>' title="Home"><span>Home</span></a></li>
Also, if you use theming, for images consider using SkinId with asp:Image. For background images, move declarations to css under theme folder.
I have the following Repeater control to display a list of elements.
<td id="tdLeftBlock">
<ul id="leftList">
<asp:Repeater ID="rptLatestListingsLeft" runat="server"
OnItemDataBound="rptLatestListingsLeft_OnItemDataBound">
<ItemTemplate>
<div id="divMapPinLeft" runat="server">
<asp:Label runat="server" ID="lblMapPinIndexLeft"></asp:Label>
</div>
<li id='<%# String.Format("liBusiness{0}", Eval("BusinessID")) %>'
style="padding-bottom: 30px">
<asp:HyperLink ID="lnkBusiness" runat="server">
<%# Eval("BusinessName")%>
</asp:HyperLink>
<div class="divAddressLeft"><%# Eval("City")%>, <%#
Eval("ProvinceCode")%></div>
<div id="divStatusLeft"><%# GetStatus(Eval("BusinessID"))%> |
<span class="statusTag"><%# GetDay(Eval("UpdateDate"))%></span></div>
</li>
</ItemTemplate>
</asp:Repeater>
</ul>
</td>
Firefox and other non IE browsers understand that the div #divMapPinLeft must be rendered at the same level as its li sibling. IE, on the other hand, doesn't recognize this hierarchy and puts the div under the li in each Repeater item. Solutions are appreciated. Thank you.
You can't do it in such way. li is only allowed tag under ul, you have invalid html. You can't put div there. Put your div under li.