Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto generating code-behind files from .aspx files

I have a designer working on several pages in Dreamweaver. The designer is creating .aspx files with the Page directive at the top. These are getting shipped to me and I'm adding them to the Visual Studio ASP.NET WebForms Web Application Project. The problem is that there's no code-behind file by default, and I'm trying to find a shortcut to have them autogenerated as if I've added a fresh page from Visual Studio.

Is anybody aware of a shortcut?

Thanks!

like image 397
Mike Cole Avatar asked Jul 08 '26 03:07

Mike Cole


2 Answers

Add the aspx to your project, then right click on it and select "Convert to Web Application"

like image 151
NotMe Avatar answered Jul 10 '26 18:07

NotMe


Long term, answer to working with designers is to upgrade to MVC. A little easier to work with.

For the task at hand, this workflow has worked out pretty good in the past:

1) Create new web form (aspx) with appropriate name.
2) copy/paste in designer's code (sans @Page directive)
3) pray and such

Or, add the page from visual studio. Then pave over it.

like image 24
Wyatt Barnett Avatar answered Jul 10 '26 20:07

Wyatt Barnett