<FooterTemplate>
<asp:Label runat="server" ID="dlVideosFooter" Text="No Vidoes available at this moment for the selected category.Please try later or select another category"
Visible='<%#bool.Parse((dlBuzzVideos.Items.Count==0).ToString()) %>'></asp:Label>
</FooterTemplate>
Note:dlBuzzVideos is the datalist id.
Thursday, November 10, 2011
Trim a DataBound Linkbutton inside a DataList
<ItemTemplate>
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%
getShortString(Eval("Location1")) %>'></asp:LinkButton>
</ItemTemplate>
</asp:DataList>
protected string getShortString(object value)
{
string shrtString = value.ToString();
if (shrtString.Length > 4) // Change this value to set your character limit
{
shrtString = shrtString.Substring(0, 4) + "..."; // Change this value to set your character limit
}
return (shrtString);
}
source : http://forums.asp.net/t/1521615.aspx/1
<asp:LinkButton ID="LinkButton1" runat="server" Text='<%
getShortString(Eval("Location1")) %>'></asp:LinkButton>
</ItemTemplate>
</asp:DataList>
protected string getShortString(object value)
{
string shrtString = value.ToString();
if (shrtString.Length > 4) // Change this value to set your character limit
{
shrtString = shrtString.Substring(0, 4) + "..."; // Change this value to set your character limit
}
return (shrtString);
}
source : http://forums.asp.net/t/1521615.aspx/1
Subscribe to:
Posts (Atom)