ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  Dot Net Code  >>  ASP.NET Code
 
 


 

 
 ASP.NET Code interview questions  ASP.NET Code Interview Questions
 VB.NET Code interview questions  VB.NET Code Interview Questions
 C Sharp Code interview questions  C Sharp Code Interview Questions
 ADO.NET Code interview questions  ADO.NET Code Interview Questions
Question
how to design a ListView control?
 Question Submitted By :: Sona
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to design a ListView control?
Answer
# 1
</tr> <asp:ListView ID="lstBank" runat="server" 
OnItemCommand="lstBank_ItemCommand" >
                                    <LayoutTemplate>
                                        <table border="0" 
cellpadding="4" class="tblGrid tblAccount">
                                            <tr>
                                               <th 
style="text-align:center; width: 90px">
                                                    
<asp:Label ID="lblVoucherNo" Text="Voucher No" 
runat="server"></asp:Label>
                                                </th>
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblDate" Text="Date" 
runat="server"></asp:Label>
                                                </th>
                                                
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblChequeNo" Text="Cheque No" 
runat="server"></asp:Label>
                                                </th>
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblChequeDate" Text="Cheque Date" 
runat="server"></asp:Label>
                                                </th>
                                              
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblAmount" Text="Amount" 
runat="server"></asp:Label>
                                                </th>
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblPartyName" Text="Party Name" 
runat="server"></asp:Label>
                                                </th>
                                                
                                                <th 
style="text-align:left; width: 90px">
                                                    
<asp:Label ID="lblDate" Text="Date" 
runat="server"></asp:Label>                                 
                   
                                                </th>
                                                <th 
style="text-align:center; width: 50px">
                                                    
<asp:Label ID="lblCheck" Text="Check" 
runat="server"></asp:Label>
                                                </th>
                                                
                                            </tr>
                                            
<asp:PlaceHolder runat="server" 
ID="itemPlaceholder"></asp:PlaceHolder>
                                            <tr 
class="gridOddRow gridOddRowListUser">
                                                <td 
colspan="10" class="noBrdrBtm noBrdrRght">
                                                    <table 
class="tblTotalRecords">
                                                        <tr 
class="removeHoverColor">
                                                            
<td valign="top" align="left">
                                                            
    <div style="text-align: left; padding-top: 4px; 
vertical-align: text-bottom">
                                                            
        Total Records:
                                                            
        <asp:Label ID="lblTotalRecords" runat="server" 
Text="1"></asp:Label>
                                                            
    </div>
                                                            
</td>
                                                            
<td valign="middle">
                                                            
    <div style="text-align: center;">
                                                            
        Page Size:
                                                            
        <asp:DropDownList AutoPostBack="true" 
OnSelectedIndexChanged="ddlPagingSize_OnSelectedIndexChanged
"
                                                            
            CssClass="PagingDropDownStyle" 
ID="ddlPagingSize" name="ddlPagingSize" runat="server">
                                                            
        </asp:DropDownList>
                                                            
    </div>
                                                            
</td>
                                                            
<td align="center" valign="middle" colspan="10">
                                                            
    <div style="text-align: center;">
                                                            
        <asp:LinkButton ID="lnkPrev" CommandName="Prev" 
ToolTip="Previous" runat="server"> << </asp:LinkButton>
                                                            
        Page
                                                            
        <asp:TextBox OnKeyPress="return DoPagingOnEnter();" 
runat="server" Width="18px" Height="12px"
                                                            
            Style="text-align: center; font-family: Arial; 
font-size: 11px;" Text="1" ID="txtPage"></asp:TextBox>
                                                            
        of
                                                            
        <asp:Label ID="lblCount" 
runat="server">1</asp:Label>
                                                            
        page(s)
                                                            
        <asp:LinkButton ID="lnkNext" CommandName="Next" 
ToolTip="Next" runat="server"> >> </asp:LinkButton>
                                                            
    </div>
                                                            
</td>
                                                     
                                                    </table>
                                                </td>
                                            </tr>
                                        </table>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <tr id="idRows" 
onclick="return ChangeRowColor(this);" class="<%# 
Container.DisplayIndex % 2 == 
0 ? "gridOddRow" : "gridEvenRow" %>" >
                                             <td 
style="display:none" >
                                                <asp:Label 
runat="server" Text='<%# Eval("VoucherId")%>' 
ID="lblVoucherId"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label 
runat="server" Text='<%# Eval("VoucherNumber")%>' 
ID="lblVoucherNo"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label 
runat="server" Text='<%# Eval
("VoucherDate","{0:dd/MM/yyyy}")%>'  
                                                    
ID="lblDate"></asp:Label> 
                                            </td>
                                            <td>
                                                <asp:Label 
runat="server" Text='<%# Eval("ChequeDDNo")%>' ToolTip='<%# 
Eval("ChequeDDNo")%>'
                                                    
ID="lblChequeNo"></asp:Label>
                                            </td>
                                            <td >
                                                <asp:Label 
runat="server" Text='<%# Eval
("ChequeDDDate","{0:dd/MM/yyyy}")%>' 
ID="lblChequeDate"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label 
runat="server" Text='<%# Eval("Amount")%>' 
ID="lblAmount"></asp:Label>
                                            </td>
                                            <td >
                                                <asp:Label 
runat="server" Text='<%# Eval("PartyName")%>' 
ID="lblPartyName"></asp:Label>
                                            </td>
                                            
                                            <td 
>                                            
                                              <asp:TextBox 
runat="server" ID="txtDate" Text='<%# Eval
("ReconciledDate","{0:dd/MM/yyyy}")%>'  class="txtNormal 
CustomWidth" onkeypress="Date_Only();" > </asp:TextBox>
                                           
<ajax:CalendarExtender ID="calDate" 
PopupPosition="BottomRight" Format="dd/MM/yyyy"
                                                    
TargetControlID="txtDate" runat="server">
                                                
</ajax:CalendarExtender>
                                            </td>
                                            <td >
                                               
<asp:CheckBox runat="server" ID="chkRec"  value='< %# Eval
("VoucherNumber")%>'  OnCheckedChanged="chkRec_checked" 
AutoPostBack="true" /> <%--onMouseDown=<%#"return TestCheck
('"+ Eval("Amount") +"',this);"%>--%>
                                            </td>
                                            
                                        </tr>
                                    </ItemTemplate>
                                    <EmptyDataTemplate>
                                        <table border="0" 
cellpadding="4" class="tblGrid tblAccount">
                                            <tr>
                                            <th 
style="display: 
none">                                                     
                                                        
<asp:Label ID="lblVoucherId" Text="Voucher Id" 
runat="server"></asp:Label>                                 
                                                            
     
                                                </th>
                                                <th 
style="padding-left: 4px; width: 
100px">                                                   
                                                    Voucher 
No                                                   
                                                
                                                <th 
style="padding-left: 4px; width: 
150px">                                                     
                                                        
<asp:Label ID="lblCurrency" Text="Voucher Date" 
runat="server"></asp:Label>                                 
                                                            
     
                                                </th>
                                                <th 
style="text-align:right; width: 100px">
                                                    
<asp:Label ID="lblChequeNo" Text="Cheque No" 
runat="server"></asp:Label>
                                                </th>
                                                <th 
style="text-align:right; width: 110px">
                                                    
<asp:Label ID="lblChequeDate" Text="Cheque Date" 
runat="server"></asp:Label>
                                                </th>
                                                </th>
                                                <th 
style="padding-left: 4px; width: 
180px">                                                    
                                                        
<asp:Label ID="lblAmount" Text="Amount" 
runat="server"></asp:Label>                                 
                   
                                                </th>
                                                <th 
style="padding-left: 4px; width: 
180px">                                                    
                                                        
<asp:Label ID="lblPartyName" Text="Party" 
runat="server"></asp:Label>                                 
                   
                                                </th>
                                                
                                                <th 
style="padding-left: 4px; width: 
180px">                                                    
                                                        
<asp:Label ID="lblDate" Text="Reconcile Date" 
runat="server"></asp:Label>                                 
                   
                                                </th>
                                                <th 
style="padding-left: 4px; width: 
180px">                                                    
                                                        
<asp:Label ID="lblCheck" Text="Reconcile" 
runat="server"></asp:Label>                                 
                   
                                                </th>
                                                
                                            </tr>
                                            <tr>
                                                <td 
class="gridOddRow" colspan="10">
                                                    <center>
                                                        
<b>No records found.</b>
                                                    
</center>
                                                </td>
                                            </tr>
                                        </table>
                                    </EmptyDataTemplate>
                                </asp:ListView>
 
Is This Answer Correct ?    0 Yes 0 No
Kris
 

 
 
 
Other ASP.NET Code Interview Questions
 
  Question Asked @ Answers
 
Code for Getting Information About A File?  1
Code for a Simple Way to Write XML in .NET (XmlTextWriter)  1
how to upload a photo? i need to use it in a matrimonial applicaton...  1
what is the value that reside in a hidden field when no value is assigned to it?how it can be used in a if statement??  1
working with fileUpload ?  1
how to upload an excel in c# ASP.Net?  2
How to Create Scrollable Micro Windows?  2
How we implement the paypal in my website and how we make a payment through Credit Card.  2
Give coding for Implementing a Fixed GridView Header in ASP.NET?  1
Data Reader Vs DataSet TCS1
Code for Sending E-Mail with System.Web.Mail?  1
How to send e-mail from an ASP.NET application? TCS10
hold checkbox values  4
How to Export Data to Excel? Eastcom-Systems3
Give coding for Exception Handling Techniques in ASP.NET? Microsoft3
How to get the row index on checking a Checkbox in a ListView  1
how to design a ListView control?  1
how to convert Dataset to Object Array or list in c# .net  3
how can we close a web page in asp.net without using jscript?  1
What do you create for easier access of data? NIIT2
 
For more ASP.NET Code Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com