Click here to Skip to main content
11,806,590 members (63,716 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET
<asp:DataList ID="DataList1" runat="server" DataKeyField="id" onitemdatabound="DataList1_ItemDataBound1"
<p><b><%#Container.ItemIndex+1 %></b></p>
<asp:Literal ID="Literal1" runat="server" Text='<%# Server.HtmlDecode(Eval("question").ToString()) %>'></asp:Literal></b></p>

<div class="ans">
<asp:DataList ID="DataList2" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" >
<asp:Literal ID="Literal2" runat="server" Text='<%# Server.HtmlDecode(Eval("A1").ToString()) %>'></asp:Literal></b></p>
<asp:Literal ID="Literal3" runat="server" Text='<%# Server.HtmlDecode(Eval("A2").ToString()) %>'></asp:Literal></b></p>
<asp:Literal ID="Literal4" runat="server" Text='<%# Server.HtmlDecode(Eval("A3").ToString()) %>'>

In this, in nested datalist i have a label(lblAnswer) to display correct answer for which i want it to be highlighted.. but im not getting desired output please provide the solution.
Posted 29-Jan-13 19:47pm
Edited 30-Jan-13 16:12pm
Sheikh Muhammad Haris at 30-Jan-13 22:11pm
Where is the question ?
Sheikh Muhammad Haris at 30-Jan-13 22:11pm
Oh .. I found it ... you have added it inside your code blocks :)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Im sorry i may be in-correct but would

TD              {font-family: Arial; font-size: 10pt; text-align: center;}
DIV                 {font-family: Arial; font-size: 9pt;}
TH              {font-family: Arial; font-size: 10pt; text-align: center;}

Help ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 ppolymorphe 205
1 OriginalGriff 175
2 Richard Deeming 175
3 Sergey Alexandrovich Kryukov 170
4 Abhinav S 120
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100