Posts

Showing posts from December 3, 2013

SPSiteDataQuery to get data from multiple lists in site collection level in sharepoint 2013

using Microsoft.SharePoint; using Microsoft.SharePoint.WebControls; using System; using System.ComponentModel; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; namespace SPListDataQuery.ListDataQuery {     [ToolboxItemAttribute(false)]     public class ListDataQuery : WebPart     {         private GridView grid;         private GridView myGrid;         private TextBox txtbox;         protected override void CreateChildControls()         {             this.grid = new GridView();             this.Controls.Add(this.grid);             this.myGrid = new GridView();             this.Controls.Add(this.myGrid);             this.txtbox = new TextBox();             this.Controls.Add(this.txtbox);         }         protected override void RenderContents(HtmlTextWriter writer)         {             base.RenderContents(writer);             using(SPSite spsite=new SPSite("http:/