Friday, November 22, 2013

C# Code Behind not accessing controls in ASP .NET

  I had an issue where I would add controls to my aspx file but the control was not visible, hence not usable, from the code behind page. I noticed there was not a .aspx.designer.cs file. I right clicked on the aspx file and chose the "Convert To Web Application". This generated the .aspx.designer.cs file and gave me access to the controls on the aspx page from the code behind code.
   So look to see if you have a .aspx.designer.cs file and regenerated it if needed.





No comments:

Post a Comment