Using UserControls inside a Visual WebPart User Control

Tuesday, 7 September 2010 02:36 by FirozOzman

I was migrating SharePoint 2007 solution built using VisualStudio Extension 1.3 to SharePoint 2010 lately.

One of the important items we had to migrate where obviously the WebParts. Inorder to get the visual capabilities and for many other benefits we've used user controls inside webparts.

When moving to SharePoint 2010, I found out that Visual WebParts are doing exactly same as what we were doing all these while, except that now Visual Studio 2010 is intelligent enough to make the user controls part of the deployment.

Eveything was smooth in migrating except the common User Controls we used within the UserControls in WebPart. Yes, when we add new UserControls in the SharePoint 2010 solution, Visual Studio puts them under ControlTemplates folder for deploying it on to ControlTemplates folder under 14 hive (ya 14 hive, or you call it SharePoint root folder).

This will help us deploy this easily. However when you add these user controls within the WebPart usercontrol, render will fail coz Visual Studio puts the path to this folder as ~/_controltemplates/yourWebPartFolder/yourWebPart.ascx and actual physical path is  ~/ControlTemplates/yourWebPartFolder/yourWebPart.ascx

For the Solution to work fine after deploying this path has to be ~/_controltemplates/yourWebPartFolder/yourWebPart.ascx (virtual path under iis to ControlTemplates folder)

Trick to fix the situation is to ......

Rename the folder ControlTemplates to _ControlTemplates under your solution location.

Kudos!

 

 

 

 

ASP.NET 4 and Visual Studio 2010 Release Candidates Now Available!

Friday, 12 February 2010 02:24 by FirozOzman

Visual Studio 2010 and .NET Framework 4 Release Candidate

Visual Studio 2010 is an integrated development environment that simplifies the entire development lifecycle, from design to deployment.

Release Candidate (RC) Highlights

  Downloads for the Release Candidate are Listed Below
There are many download options for you to choose from. If you have any questions about using ISO files, check out Chuck Sterling's getting started guide.
  Featured Overviews and Walkthroughs
Check out this diverse collection of walkthroughs for RC. They provide step-by-step instructions for common scenarios and are a good place to start.
  Tell Us What You Think
Once you've had a chance to download and start working with the RC, please take 5 minutes and tell us what you think.

Go to http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx for details

Categories:   ASP.Net | C# | Visual Studio 2010
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Visual Studio 2010

Wednesday, 25 March 2009 13:25 by FirozOzman

Visual Studio 2010 is on its way with lots of improvements. What I am waiting to see is it`s support for BizTalk Applicaitons, which we solely missed in VS 2008.

Here are some links to get us to speed with the new trend:

VS 2008 Home MSDN Home page: http://msdn.microsoft.com/en-us/vstudio/bb725993.aspx
Channel9 Videos: http://channel9.msdn.com/Shows/10-4/

Tags:   , ,
Categories:   Visual Studio 2010
Actions:   E-mail | Permalink | Comments (1) | Comment RSSRSS comment feed