Wednesday, 4 July 2012

ASCX(ascx.cs)

STEP 1: Create a VisualWebPart like AppsDetailsPage

STEP 2: Write a coding in AppsDetailsPageUserControl.ascx.cs 


STEP 3:

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using System.Linq;
using VCSB.INTRANET.BLL;
using VCSB.INTRANET.DAL;


namespace VCSB01.INTRANET.WebPartDetailsPage.AppsDetailsPage
{
    public partial class AppsDetailsPageUserControl : UserControl
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    BindGrid();
                }
            }
            catch (Exception ex)
            {
                ErrorHelper.Add(Convert.ToString(ex.Message), Convert.ToString(ex.StackTrace));
                SPUtility.TransferToErrorPage(MessageHelper.Message(MessageMode.CommonErrorMessage));
            }
        }
       

        public void BindGrid()
        {
            AppsDL.GetAppsListItem(Apps);
           
        }
        protected void Apps_ItemDataBound(object sender, DataListItemEventArgs e)
        {
           
        }
       
    }
}
 

No comments:

Post a Comment

SharePoint online - Get List-item attachments and Display to div

Step 1 : Create a List ex: TestList and attach few images Step 2 : Copy and Pastet the below coding in App.js var  Items =  null ; ...