Click here to Skip to main content
15,910,123 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi sir,
i am new for the databind of gridview and other controls with the help of xml in 3 layer architecture. please suggest me with an example. I will be thankfull to you.
Thanks.
Posted

3 layer architecture has to deal with getting the data. Your binding of data (whatever retrieved) is only one player - front end based.
so, based on your layer logic, get the data in XML format in your frontend. Once you have it, use it to bind it with grid.

Look here:
How to Bind a GridView Control to XML in ASP.NET[^]
Binding XML Data to the GridView[^]

Try!
 
Share this answer
 
i am giving a simple example

C#
private void ReadxmlFromXmlTextReader(string file_Path )
    {
        DS_purchase = new DataSet(); // Create the DataSet to read the schema into.    
        FileInfo FInfo = new FileInfo(file_Path);
        if (FInfo.Exists)
        {
            System.Xml.XmlTextReader xmlReader = new System.Xml.XmlTextReader(FInfo.FullName);
            xmlReader.WhitespaceHandling = WhitespaceHandling.None;
            try
            {
                DS_purchase.ReadXml(xmlReader);
               }
            catch (Exception ex)
            {
                    
            }
            finally
            {
                xmlReader.Close();
            }

        }
        
    }
 
Share this answer
 
Comments
deepureddy18 1-Jun-12 8:08am    
How to Bind a GridView Control to XML in ASP.NET[^]
Binding XML Data to the GridView[^]

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900