Using UserControls inside a Visual WebPart User Control
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.
When the blood flow improves in the penile region, it can not only maintain a stiffer erection but also be cialis tablets in india a self-limiting disease, it can also be a disease but this is not correct it is not a direct threat to the life of the disease, Renal Failure can be divided into Acute kidney Failure and Chronic Renal Failure. People already on nitrate medication should pfizer viagra pharmacy also avoid using Kamagra. You will find also herbal sildenafil in india vitamins for calming purposes, improved heart health, lower cholesterol, colon cleansing, liver tonic, antioxidants, enhanced memory, decreasing stress, and many more. One should get over stress really fast before it causes harm to your health and rules over your health. viagra order shop
Kudos!
Recent Comments