Data Binding ASP.Net Tutorial

Each column can be any of several column types
The order of your column tags determines the left-to-right order of columns in the GridView.
Class                  Description
BoundField             text
ButtonField            button
CheckBoxField          check box
                       It¡Â¯s used automatically for true/false fields (in SQL Server, these are fields that use the bit data type).
CommandField           provides selection or editing buttons.
HyperLinkField         a hyperlink.
ImageField             image data from a binary field.
TemplateField          specify multiple fields, custom controls, and arbitrary HTML
<%@ Page Language="VB" AutoEventWireup="false"%>


    Untitled Page


    
    

        "
            DeleteCommand="DELETE FROM [Books] WHERE [BookID] = @BookID" 
            InsertCommand="INSERT INTO [Books] ([Title], [Author], [YearPublished], [Price], [LastReadOn], [PageCount]) VALUES (@Title, @Author, @YearPublished, @Price, @LastReadOn, @PageCount)"
            SelectCommand="SELECT * FROM [Books]" 
            UpdateCommand="UPDATE [Books] SET [Title] = @Title, [Author] = @Author, [YearPublished] = @YearPublished, [Price] = @Price, [LastReadOn] = @LastReadOn, [PageCount] = @PageCount WHERE [BookID] = @BookID">
            
                
            

            
                
                
                
                
                
                
                
            

            
                
                
                
                
                
                
            

        
    
    

        
            
                
                                    SortExpression="BookID" />
                
                    
                        '>
                    

                    
                        '>
                    

                
                
                
                
                    
                        $' Columns="10">
                                                    Display="Dynamic" ErrorMessage="You must enter a price.">
                                                    Display="Dynamic" ErrorMessage="You must enter a valid numeric value greater than or equal to zero."
                            Operator="GreaterThanEqual" Type="Double" ValueToCompare="0">
                    

                    
                        '>
                    

                
                
                
            

            
            
            
            
            
            
            
            
            
            
            
        
         
    


File: Web.config


    
                    providerName="System.Data.SqlClient" />