Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tuning Off Code behind in VS.NET

Status
Not open for further replies.

ghesse

Programmer
Jun 16, 2003
51
US
Hello,

I was wondering if any of you know how to turn off the default code behind mode that Visual Studio .NET has set up.

Thanks,
ghesse
 
I think all you have to do is get rid of this part from the page directive:

Codebehind="CodeBehindFile.aspx.vb Inherits="Application.Class

D'Arcy
 
Yes, that would do it, but I'm asking if there's a way to stop them from autogenerating the codebehind files and putting all that information in the aspx file itself.

ghesse
 
I'm not sure, but I gotta ask:

Why would you WANT to turn off code behind? Are you writing all your apps inline?!

D
 
No, the entire application is not inline.

I have a base code behind file that I want to use for the majority of pages in a component of my application (reporting). Some of the methods are overridable but I don't want a lot of extra .cs files cluttering up my project. So if there was way when I added a new webform to the project where that extra .cs file wasn't generated and I was given the nice auto generated template from microsoft I would be a happy little programmer again.

ghesse

 
A member here, stsuing, had a great suggestion a few threads ago about how to create a base class that pages could be inherited from (so common functions could still be available without alot of extra files).

You can read the thread here: thread855-627093

Sounds like it *might* be what you're looking for.

D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top