示例#1
0
 private void BindUserDetails()
 {
     string UName = txtUserName.Text; //Textbox to read the values
     localhost.Service objService = new localhost.Service();
     //webservice aliase name with object
     DataSet ds = new DataSet();
     XmlElement elem = objService.GetUserDetails(UName);
     if (elem != null)
     {
         XmlNodeReader nodereader = new XmlNodeReader(elem);
         ds.ReadXml(nodereader, XmlReadMode.Auto);
         gvUserDetails.DataSource = ds;
         gvUserDetails.DataBind();
     }
     else
     {
         gvUserDetails.DataSource = null;
         gvUserDetails.DataBind();
     }
 }
示例#2
0
        private void BindUserDetails()
        {
            string UName = txtUserName.Text; //Textbox to read the values

            localhost.Service objService = new localhost.Service();
            //webservice aliase name with object
            DataSet    ds   = new DataSet();
            XmlElement elem = objService.GetUserDetails(UName);

            if (elem != null)
            {
                XmlNodeReader nodereader = new XmlNodeReader(elem);
                ds.ReadXml(nodereader, XmlReadMode.Auto);
                gvUserDetails.DataSource = ds;
                gvUserDetails.DataBind();
            }
            else
            {
                gvUserDetails.DataSource = null;
                gvUserDetails.DataBind();
            }
        }