Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8967541
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:16:00+00:00 2026-06-15T17:16:00+00:00

I am having a problem with visual studios premium 2012. Recently, I changed the

  • 0

I am having a problem with visual studios premium 2012.

Recently, I changed the namespace of a button control, which inherits from Linkbutton. Code looks like this:

//namespace MyOldNameSpace
namespace MyNewNameSpace
{
    public class myButton : LinkButton
    {
        //some stuff here
    }
}

I updated my all references to this code to match this change. However…

The designer.cs files refuse to generate the buttons with the newly updated namespace. For instance, the functions look like this in my designer.cs files:

protected global::MyOldNameSpace.myButton myButton1

In order to make everything compile and work, I have to go into the code and update the Namespace in the designer.cs files. I am having no functionality issues. Also, I changed my web.config to match the new changes.

I have tried the following:

  • Closing and re-opening visual studios
  • Going into ~/../appdata/ and removing some files [found this solution on a blog]

But none of this has worked.

Thanks in advance

EDIT some changes that I made:

in web.config

<add tagPrefix="abc" namespace="MyNewNameSpace" assembly="MyNewNameSpace"

in the .aspx page

<abc:myButton runat="server" onclick=...etc...>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:16:01+00:00Added an answer on June 15, 2026 at 5:16 pm

    Your actions are:

    1. You change the namespace inside the class definition
    2. You update the web.config with the new namespace

    What you expect is:

    1. Visual Studio will update the aspx.designer.cs file with the new namespace

    How it really works:

    Updates to the designer.cs are triggered by changes in the .aspx file.

    There are 2 3 possible scenarios to solve the problem:

    1. You have to Cut the control tag from the .aspx page => Save the .aspx page => Paste the control tag back inside the .aspx page => Save the .aspx page

    2. or you manually modify the line by replacing the namespace:

      protected global::MyOldNameSpace.myButton mButton;//old line
      protected global::MyNewNameSpace.myButton mButton;//new line
      

      [EDIT]

    3. or you switch the .aspx from Source to Design => Save => Rebuild => Switch to Source

    I’d say the option number three is the preferred workaround.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problem from a while (since I'm using visual studio 2010 I think).
I am having a problem getting the FormView Control in Visual Studio 2010 inserting
I am having a weird problem with Page Inspector in Visual Studio 2012. Page
I'm having a problem with the Visual Studio 2010 RC Webforms ReportViewer. It shows
I'm having a problem with _beginthread in microsoft visual studio c++ 10 express: my
I'm having the following problem using the Visual Studio 2010 Team System Beta 1:
I am having a problem setting up the following in Visual Studio 2008: a
I am having a strange problem with the .NET TabControl in C# (Visual Studio
I'm having a bizarre problem with Visual Studio 2008. I wanted to debug one
I'm having problem with stringstream.my visual studio nor linux g++ can understand stingstream. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.