ASP.NET, Visual Studio

How to recover the .aspx.designer.cs file

In ASP.NET, a web application consists of (a lot of) ASPX pages. These ASPX pages are actually a combination of three files:

  • FileName.aspx – Layout and User interface
  • FileName.aspx.cs – The code-behind file that contains the functionality (ideally)
  • FileName.aspx.designer.cs – The file that contains information about all the controls being used in the ASPX page. DO NOT TOUCH!

*.cs denotes C#. the extension would be .vb for VB.Net

Now, coding can get really frustrating at times and you would permanently delete a file from Source Control in anger before you came back to your senses. And it would be too late! Not quite!

Continue reading

Advertisements