• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 197
  • Last Modified:

Automatically updating code-behind files in VS2005

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.
1 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now