Automatically updating code-behind files in VS2005

Posted on 2007-10-01
Last Modified: 2013-11-26
I have a web user control called EditUserInfo.ascx that I'm working on in Visual Studio 2005. I added an <asp:TextBox id="company" runat="server"> to the page and an <asp:RequiredFieldValidator id="companyValidator" runat="server" ControlToValidate="company" ErrorMessage="error">. When I run the updated user control, the required field validator doesn't work, and I noticed that the code-behind file (EditUserInfo.ascx.cs) hasn't been changed even though I added two new controls. Does anybody know how I get VS to update the code-behind file? Thanks.
Question by:tjgquicken
    1 Comment
    LVL 12

    Accepted Solution

    Neither of the controls have any code to be placed in the code-behind file.
     Under the build Menu, use the Rebuild Solution option to force each page to be recompiled.

      I am not sure how the validator is not working. Are you missing Display="Dynamic|Static" attribute on the validator?   Does the control/page use validation groups?


    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now