In this example, I will tell you how to  Bind the empty Grid with Header and Footer when no data in GridView and binding the grid using XML data and performing CURD operations on XML file.

First create a new project one your Visual Basic Studio and then write the following code:
using System; 
using System.Collections.Generic; 
using System.Data; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using System.Xml; 
namespace OvidMDSample  

public partial class Home: System.Web.UI.Page  

private const string xmlFilePath = "~/XML/HiddenPagesList.xml"; 
public string domainUrl = HttpContext.Current.Request.Url.Authority; 
protected void Page_Load(object sender, EventArgs e)  

if (!IsPostBack) 

    BindHiddenPages(); 


private void BindHiddenPages()  

DataSet ds = new DataSet(); 
ds.ReadXml(Server.MapPath(xmlFilePath)); 
if (ds != null && ds.HasChanges()) 

    grdHiddenPages.DataSource = ds; 
    grdHiddenPages.DataBind(); 
}  
else  

    DataTable dt = new DataTable(); 
    dt.Columns.Add("ID"); 
    dt.Columns.Add("PageName"); 
    dt.Columns.Add("Description"); 
    dt.Columns.Add("PageUrl"); 
    dt.Columns.Add("Address"); 
    dt.Rows.Add(0, string.Empty, string.Empty, string.Empty); 
    grdHiddenPages.DataSource = dt; 
    grdHiddenPages.DataBind(); 
    grdHiddenPages.Rows[0].Visible = false; 
    // grdHiddenPages.DataBind(); 



HostForLIFE.eu ASP.NET 5 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.