March 23, 2011

UserControl in SharePoint 2007

http://blogs.msdn.com/b/pranab/archive/2007/11/30/adding-user-control-to-sharepoint-2007-moss-wss-web-part-and-handling-events-in-there.aspx

Important! - Fully Qualified Name

When Copying the ASCX File from UI Project to WebPart Project, need to change the Inherit attribute as below along with the reference of UI Project in WebPart Project.

<%@ Control Language="C#" AutoEventWireup="true" Inherits="UINameSpace.ClassName, UINameSpace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Key" Debug="true" %>

It searches for the classname in the given namespace and executes our logic.
Code-Behind also works!!!

No comments:

SonarQube with Jenkins Setup using Docker Images

https://funnelgarden.com/sonarqube-jenkins-docker/  https://medium.com/@hakdogan/an-end-to-end-tutorial-to-continuous-integration-and-con...