Data Binding ASP.Net Tutorial

<%@ Page Language="C#" MaintainScrollPositionOnPostback="true" %>
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    Edit GridView


    
    

            id="grdProducts"
        DataSourceID="srcProducts"
        DataKeyNames="Id"
        AutoGenerateEditButton="true"
        AutoGenerateDeleteButton="true"
        Runat="server" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id,Title,Director FROM Products"
        UpdateCommand="UPDATE Products SET Title=@Title, Director=@Director
            WHERE Id=@Id"
        DeleteCommand="DELETE Products WHERE Id=@Id"
        Runat="server" />
    

    


File: Web.config

  
             connectionString="Data Source=.\SQLEXPRESS;
         AttachDbFilename=|DataDirectory|MyDatabase.mdf;Integrated Security=True;User Instance=True" />