Regenerate Gen Code Files in Visual Studio
I am using Visual Studio 2008. I added a control on the page, but I cannot link to it in the code file. When I looked at the Code-Gen file, I couldn't find my new control. Looks like Visual Studio didn't update the Gen code file to include my control. Is there a way to manually generate this Gen code file?
+2
a source to share
1 answer
If you want to update the constructor file, you can create it like this:
- Delete the [NameHere] .aspx.designer.cs file .
- Right-click the [NameHere] .aspx file .
- Click Convert to Web Application .
- The constructor file is now re-created or an error occurs, letting you know that there is a problem with the generation ... given your case, this is most likely, but it will let you know what to fix, and then just click "Convert to Web Application" again as soon as it gets fixed.
+7
a source to share