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!!!
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:
Post a Comment