SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have created the Visual web part for SP2010 site, What i need is i have implement it into this into MOSS 2007 site.

Is MOSS2007 support visual web part,and how to do this???

share|improve this question
up vote 1 down vote accepted
  1. Create a web user control and do the necessary code behind.
  2. Specify the fully qualified name of the assembly in the ascx file Inherits attribute, so that code can be deployed to GAC and the ascx file can read it from there.
  3. Set the deployment location for the ascx file to the /_controltemplates/ folder (in 12 hive) in feature you will use to deply the soutions.
  4. Add a web part in the same solution and load the ascx file using this.Page.LoadControl(_ascxPath);
  5. Deploy the solution.
share|improve this answer

Have a look at Jan Tielen's 'Smart Part' that allows any ascx file to be hosted in SharePoint 2007.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.