Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

visual studio 2012 register ascx in web config

Posted on 2015-01-15
5
Medium Priority
?
404 Views
Last Modified: 2015-01-30
I use visual studio 2012 to build web application project (not website) and  register ascx in web config.
e.g.

<add tagPrefix="Controls" tagName="footer" src="~/controls/Footer.ascx"/>
       
However, the webpage aspx does not recognizes the control. No idea why.
It works fine in visual studio 2010.
0
Comment
Question by:ITsolutionWizard
  • 4
5 Comments
 
LVL 8

Expert Comment

by:Naitik Gamit
ID: 40552863
For VS2012, you need to remove the asp tagprefixes, so the section ends up being

in web.config:

<pages validateRequest="false">
  <controls>
    <add tagPrefix="sc" namespace="Sitecore.Web.UI.WebControls" assembly="Sitecore.Kernel" />
    <add tagPrefix="sc" namespace="Sitecore.Web.UI.WebControls" assembly="Sitecore.Analytics" />
  </controls>
</pages>
0
 
LVL 1

Author Comment

by:ITsolutionWizard
ID: 40554478
I do not know what you mean. so if i have below ascx registration. what do i need to change?

<add tagPrefix="Controls" tagName="footer" src="~/controls/Footer.ascx"/>
0
 
LVL 8

Expert Comment

by:Naitik Gamit
ID: 40554769
Try Like:

<configuration>

  <system.web>

    <pages>
      <controls>
        <add tagPrefix="sc" src="~/locationofcontrol" tagName="sitecore"/>
      </controls>
    </pages>

  </system.web>

</configuration>

Also Read This:
http://haacked.com/archive/2006/11/14/register_custom_controls_in_web.config.aspx/
0
 
LVL 8

Expert Comment

by:Naitik Gamit
ID: 40554771
0
 
LVL 8

Accepted Solution

by:
Naitik Gamit earned 2000 total points
ID: 40554773
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month11 days, 12 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question