|
-
January 13th, 2010, 12:49 PM
#1
[RESOLVED] Create Code Behind Files Automatically
Hi. I've just started learning .net with VB and C#. I'm trying to use Code Behind files but the problem I'm having is that I can't create them automatically. I'm using Visual Studio 2008 incidentally. If I go to File > New > File.. and then enter test1.aspx.cs it just creates a HTML file with a Page directive at the top.
How do I get it to add the Import statements at the top and set up the Partial class (if that's possible)?
In my book and on the web it would suggest that this just happens.. But no matter what I do it won't do this for some reason.
Edited I used File > New > File.. > Class
instead and this seemed to do the trick. It moaned about it not being in the App_Code folder for some reason. Is this the general way of making the code behind file?
I know that sometimes code behind files are just created for you but that doesn't seem to have happened here.
Last edited by Nibinaear; January 13th, 2010 at 01:20 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|