CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.vs_2005_web_application_projects Tags:
Item Type: NewsGroup Date Entered: 6/29/2007 2:31:33 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 31 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
Magnesium
Asp.Net User
Event Stub Behavior Change in VS 2005 Web Application6/29/2007 2:31:33 PM

0/0

Hey Guys,

 A little while back I did SP1 on my VS 2005 Standard Edition. Now when I create new Web Apps, and double click on server controls, it's putting the event handler stub in the script. Like this:

<script runat="server">

protected void Calendar2_SelectionChanged(object sender, EventArgs e)

{

}

</script>

 

Instead of this:

public partial class Start : System.Web.UI.Page

{protected void Page_Load(object sender, EventArgs e)

{

}

protected void Calendar2_SelectionChanged(object sender, EventArgs e)

{

}

}

 

Also, it nags me in Source View about the CodeBehind directive. "In the @ Page directive is no longer supported."

 Did my SP1 install get fubared or something? What should I do

 

Thanks,

REA_ANDREW
Asp.Net User
Re: Event Stub Behavior Change in VS 2005 Web Application6/29/2007 2:44:27 PM

0/0

when you add pages to your web application do you tick the box which is store code in code behind file?  You have inline code there as opposed to code behind


Cheers,

Andrew
Magnesium
Asp.Net User
Re: Event Stub Behavior Change in VS 2005 Web Application6/29/2007 2:52:49 PM

0/0

Thanks for replying so quickly, Andrew

Here's something funny. I add a new webform using right click on my solution explorer, Add New Item, then the standard dialog pops up. If I click on Web Form, there's no options at the bottom except to change the file name.

 I do remember for a while ago seeing the checkbox you mention. But I can't remember the last time I ever saw that. I wonder if there's a visual studio global property I need to reset or something.

Anyway, I was looking at the attribute list in the intellisense for the page directives. And I saw a CodeFile (which looks a lot like CodeBehind). I replaced CodeBehind with CodeFile in the default page attributes, and voila. Now my method stubs pop up in my code file. So weird!

I don't mind change the directive on each new file, but I wish I knew the root cause.

Again, thanks Andrew :)

Benson Yu - MSF
Asp.Net User
Re: Event Stub Behavior Change in VS 2005 Web Application7/4/2007 2:11:00 AM

0/0

Hi Magnesium,

I agree that there are some settings (about the codebehind) may be changed on your machine. I try to find the setting but no luck. I suggest you to run ?devenv /resetsettings? or ?devenv /setup? in Visual Studio 2005 Command Prompt. They can resolve most of the IDE issues. I hope they are helpful to you.

By the way, if you cannot find the ?Place code in separate file? option, please make sure your web project is the ?Web Site project? or the ?Web Application project?. "Web Application project" doesn?t have this option.

 


Sincerely,
Benson Yu
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Magnesium
Asp.Net User
Re: Event Stub Behavior Change in VS 2005 Web Application7/5/2007 12:42:37 PM

0/0

Thanks, that's a great idea. I wasn't even aware of that possibility Big Smile

I'll mark this as answered. I don't think we're going to get further with it.

 

thanks to all who answered

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Visual Studio Hacks: Tips & Tools for Turbocharging the IDE Authors: James Avery, Pages: 478, Published: 2005

Web:
First Preview Download of VS 2005 Web Application Project Model ... We are making a preview release of the VS 2005 Web Application Project ..... of a web project and found them very confusing with the need of the Stubs, ...
New Web Project Model Option Coming for VS 2005 - ScottGu's Blog May 8th Update: The final release of the VS 2005 Web Application Project is now ..... P.S. Note that web-site projects do have the dynamic change behavior ...
ASP.NET 2.0 and VS 2005 - You win some, you lose some Nov 16, 2007 ... In Visual Studio 2005 you can now open a directory as a web ..... with this behavior is manifested in applications that rely on dynamically ...
15 Seconds : Using Visual Studio .NET Wizards to Create an N ... If you wish to add business logic to your application, VS 2005 adds a ... button and then you can build a code stub for the save event by double-clicking on ...
An Overview of Key New Visual Studio 2005 Features As with other visual designers in Visual Studio 2005, changes made visually are ..... can be used to mimic the layout behavior of Web applications. ...
InformIT: Microsoft Visual Studio 2005 Unleashed, Adobe Reader ... The Windows Application Project Type. Form Properties and Events ... Handling a Web Service Exception. Summary. Part IV: Visual Studio 2005 Team System ...
Windows Media Center Sandbox - September, 2006 Sep 17, 2006 ... A stub application entry point that is used to ensure single instancing .... Visual Studio 2005 Service Pack 1 Update for Windows Vista ...
chaoskcuf's lab » Visual Studio 2005의 400가지 다른점 Aug 6, 2006 ... Develop a data access layer for your multi-tiered Web application more easily using the WYSIWYG designer in Visual Studio 2005. ...
Polymorphic Podcast : Architechting Ajax Applications Please note the code requires Visual Studio 2005 or Visual Web Developer 2005. ... Change browser behavior; Capture browser events. Ex: Close button ...
2008 April « devioblog An add-on, the VS 2005 Web Deployment Projects, offers the functionality ... Linking the web application to the wiki; Creating content stubs for each ASP. ...




Search This Site:










user controls with no root namespace added incorrectly

create a wap on a remote iis/frontpage extensions server

page.loadcontrol bug

problem with templated usercontrols in web applications

'java.lang.system' has returned a special case.

weird problems with iis on vista due to vss "previous versions"???

event handler creation fails when class contains overloaded methods

publish web application via msbuild

anonymous identification

migrate is not working

page_load declared twice

create project from compiled project

solution explorer bug?

compare/contrast between wsp and wap

xhtml validation during builds

wap's and unit testing

web profile generator addin registration problems!!

error generating designer file

invalid exception code was unhandled by user code?

debug on visual studio.net 2005 on wwwroot

install problem 'microsoft visual studio 2005 - update to support web application projects' in vs2005 german

migration from website project to webapplication project

unable to open aspx pages with crystal 11 release 2

release option for build not available

problem with .net framework 2.0 in windows 2003 server

website to webapplication conversion

merging webapp project dll's with a webdeployment project

debugging solution with multiple web apps launches each app

build reports?

cs0030 on the masterpage after converting to wap from 2005 ws

  Privacy | Contact Us
All Times Are GMT