Jamil haddadin

My company has sharepont 2003 system that contains some webparts that is deployed using smart webpart , the code is written by VS 2003, framework 1.1 environment, I have the source code.

as u know, using smart wepart documcumentation implies on u to place the dll in the bin folder and the ascx in the user controls folder.. and so on.

now my company is building a sharepoint 2007 system and want me to deploy these webparts, How can i do this the webparts contains datagrids that retrieve data from SQL server with some buttons assotiated with some functions.

Re: SharePoint - General Question and Answers and Discussion user control files deployment


Hi u can Create Usercontrol which can hold any type of server control ,JS and Image etc and u can inherit the control inside the Webpart make sure the Usercontrol and Cs file of Acsx should be in the web folder wss\<port>\......

the below sample show how to do that

using System;

using System.Collections.Generic;

using System.Text;

using System.Web.UI;

using System.Web.UI.WebControls.WebParts;

namespace MywebPart


class MyPart:WebPart


private Control UserControl;

protected override void CreateChildControls()


this.UserControl = this.Page.LoadControl("~/Controls/Main.ascx");