Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / April 2007

Tip: Looking for answers? Try searching our database.

IDE not creating Sub...End Sub framework for event handlers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dean.carrefour - 04 Apr 2007 16:08 GMT
I'm working on ASP.NET pages, but think this is more specific to the IDE.  
When I select a control/object (like GridView) out of the drop down list on
the top-left of the code window, then select an event from the drop down list
on the top-right of the code window (like Sorting or RowCommand), the IDE is
supposed to create the Sub...End Sub framework for this event handler so I
can just add my code, but its not working.  I am running XP Pro 2003 and
VS2005 Pro with all service packs/patches applied.

I have also tried selecting the control/object in design view, clicking on
the events button (lightning bolt) in the properties pane and then
double-clicking on the desired event, nothing happens.

Any help will be greatly appreciated.
Bryan Phillips - 05 Apr 2007 12:46 GMT
Does this happen for a completely new ASP.Net project?  Do you have the
auto event wireup option enabled in the Page directive?

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com
Web Site:  http://www.composablesystems.net

> I'm working on ASP.NET pages, but think this is more specific to the IDE.
> When I select a control/object (like GridView) out of the drop down list on
[quoted text clipped - 9 lines]
>
> Any help will be greatly appreciated.
dean.carrefour - 05 Apr 2007 14:54 GMT
When I start a completely new ASP.net project, it works fine.  In this
existing project, I noticed that the first page (default.aspx), which is
currently empty (except for the default framework), has the auto event wireup
option enabled and the page directive looks like it normally does:

<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb"
Inherits="_Default" %>

Every other page in this project is under different subdirectories and not a
single one of them has the auto event wireup option, in fact their page
directives are stripped to the very basic:

<%@ Page Language="VB" %>

Since I read your reply, I have created new pages both in the root of the
website (default2.aspx) and in the existing subdirectories and neither one
had the correct page directive at the top, only the stripped down version.  I
turned on the code-behind option when I created a new page and it puts the
full page directive in, but the auto event wireup is disabled.  I tried
changing it to 'true', saving the page, the creating another new page, it has
the full directive, but the autoeventwireup is still 'false'.  How can I turn
that back on, so that every new page in this existing project has the
autoeventwireup="true"

Thanks so much for your help.

> Does this happen for a completely new ASP.Net project?  Do you have the
> auto event wireup option enabled in the Page directive?
[quoted text clipped - 18 lines]
> >
> > Any help will be greatly appreciated.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.