Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Designer.cs not updating when new controls added to .aspx

I've added a new control to my aspx files and noticed that not only was the new control not added to the designer file but that it was also missing quite a few other controls that were added by other members of the team. I've tried deleting the designer.cs file and using "Convert to Web Application" with no success. Some other things i've tried have been excluding the aspx from the project, building, and then re-including with no success. I've also manually entered in a control that was missing in the designer into the designer. When I run after do so an error appears saying the control isn't defined, even though it actually is, and that I should check if I'm missing a directive.

The first control I added was copy and paste from a similar control and made necessary changes. But, i've also tried manually creating the control with the same results.

Any ideas?

like image 448
user819357 Avatar asked Jun 28 '11 14:06

user819357


People also ask

What is the difference between .aspx and ASPX cs?

aspx. cs code is run server side, while the . aspx file is compiled on the server and is then served to the web client requesting it.

What is the use of ASPX designer cs?

aspx. designer. cs file contains all the definition of the controls that are being used by the page. It's just segregation of the code using partial class feature.


1 Answers

Try this

1.- Change CodeBehind="Name.aspx.cs" to CodeFile ="Name.aspx.cs"

2.- Build

3.- Change CodeFile ="Name.aspx.cs" to CodeBehind ="Name.aspx.cs"

like image 65
Marinha do Nascimento Avatar answered Sep 23 '22 18:09

Marinha do Nascimento