WHERE IS *.ASPX.DESIGNER.VB FILES???????
WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 18.01.2008 22:54:00 von pickedaname
I am so frustrated, as is USUAL using Visual Studio.
NONE, NOOOOONE of my aspx files have associated designer.vb files available
(And yes, they all have the .vb code behind files).
All of my aspx files were created with the seperate code file option. I
never needed to access the designer files before, so I have no idea if they
were ever there. If they are not, how are events being wired up? They MUST be
present. Now that I DO need them, I cannot access them at all. I have tried
clicking the "show all files" in solution exporer, which is always dimmed out
but is clickable. And what makes it worse is I have just spent 2 hours
pulling my hair out on google with no results, as is usual when dealing with
Visual Studio issues. It's times like this that I SOOOOOOO REGRET not
learning UNIX/JAVA instead!!!!!!!!!
Please help me, if for anything, the $1,000's of dollars that I have spent
on MSDN subscriptions!
Re: WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 19.01.2008 08:28:17 von Harshal P
Hello pickedaname, if you create a new website (not a web application) then
there will not be any designer file and event wiring is through the aspx.
Can you post your page, if wiring is not event present in aspx?
Thanks,
Harshal
"pickedaname" wrote in message
news:38C8C6DE-B087-4BAF-A545-30FE1361E30E@microsoft.com...
>I am so frustrated, as is USUAL using Visual Studio.
> NONE, NOOOOONE of my aspx files have associated designer.vb files
> available
> (And yes, they all have the .vb code behind files).
> All of my aspx files were created with the seperate code file option. I
> never needed to access the designer files before, so I have no idea if
> they
> were ever there. If they are not, how are events being wired up? They MUST
> be
> present. Now that I DO need them, I cannot access them at all. I have
> tried
> clicking the "show all files" in solution exporer, which is always dimmed
> out
> but is clickable. And what makes it worse is I have just spent 2 hours
> pulling my hair out on google with no results, as is usual when dealing
> with
> Visual Studio issues. It's times like this that I SOOOOOOO REGRET not
> learning UNIX/JAVA instead!!!!!!!!!
> Please help me, if for anything, the $1,000's of dollars that I have spent
> on MSDN subscriptions!
Re: WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 20.01.2008 08:05:10 von smar
You've most likely made an ASP .NET Web "Site", rather than an ASP .NET "Web
Application Project" (only available in VS 2005 SP1 or VS 2008).
With web "sites", there is no .designer.vb file because the code is
dynamically compiled when it is called. You'll notice that in the Page
Directives (in the .aspx source code) that the AutoEventWireUp directive is
set to true, this means that as long as your event handler names are a
combination of the control name, an underscore and the event name, along
with appropriate parameters, the event will automatically "wire up" to the
event handler.
Any controls you put on your page are created "declaratively" and so, no
..NET code actually exists for them at design-time.
What is it that you need to do that you can't do with this model?
-Scott
"pickedaname" wrote in message
news:38C8C6DE-B087-4BAF-A545-30FE1361E30E@microsoft.com...
>I am so frustrated, as is USUAL using Visual Studio.
> NONE, NOOOOONE of my aspx files have associated designer.vb files
> available
> (And yes, they all have the .vb code behind files).
> All of my aspx files were created with the seperate code file option. I
> never needed to access the designer files before, so I have no idea if
> they
> were ever there. If they are not, how are events being wired up? They MUST
> be
> present. Now that I DO need them, I cannot access them at all. I have
> tried
> clicking the "show all files" in solution exporer, which is always dimmed
> out
> but is clickable. And what makes it worse is I have just spent 2 hours
> pulling my hair out on google with no results, as is usual when dealing
> with
> Visual Studio issues. It's times like this that I SOOOOOOO REGRET not
> learning UNIX/JAVA instead!!!!!!!!!
> Please help me, if for anything, the $1,000's of dollars that I have spent
> on MSDN subscriptions!
Re: WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 20.01.2008 09:24:00 von pickedaname
Hi Scott,
I was trying to add a MultiMenu control to a test page (I want to test
before I move it to the production master page) within the same site. I
cannot handle events for this control. in the code behind, when I create a
sub for the multiMenu1_MenuItemClicked, the "Handles MultiMenu1.Clicked"
portion is underlined. "Handles clause requires a withevents variable defined
in the containing type or one of its base types." So what you are saying is
if I create a sub
MultiMenu1_MenuItemClicked Sub without the Handles clause and
autoeventwireup is true it will create this on the fly. The question is, am I
free to create this sub in the code behind file, where the others are, or
must I insert this into a script block in the .aspx file? Thanks.
"Scott M." wrote:
> You've most likely made an ASP .NET Web "Site", rather than an ASP .NET "Web
> Application Project" (only available in VS 2005 SP1 or VS 2008).
>
> With web "sites", there is no .designer.vb file because the code is
> dynamically compiled when it is called. You'll notice that in the Page
> Directives (in the .aspx source code) that the AutoEventWireUp directive is
> set to true, this means that as long as your event handler names are a
> combination of the control name, an underscore and the event name, along
> with appropriate parameters, the event will automatically "wire up" to the
> event handler.
>
> Any controls you put on your page are created "declaratively" and so, no
> .NET code actually exists for them at design-time.
>
> What is it that you need to do that you can't do with this model?
>
> -Scott
>
>
> "pickedaname" wrote in message
> news:38C8C6DE-B087-4BAF-A545-30FE1361E30E@microsoft.com...
> >I am so frustrated, as is USUAL using Visual Studio.
> > NONE, NOOOOONE of my aspx files have associated designer.vb files
> > available
> > (And yes, they all have the .vb code behind files).
> > All of my aspx files were created with the seperate code file option. I
> > never needed to access the designer files before, so I have no idea if
> > they
> > were ever there. If they are not, how are events being wired up? They MUST
> > be
> > present. Now that I DO need them, I cannot access them at all. I have
> > tried
> > clicking the "show all files" in solution exporer, which is always dimmed
> > out
> > but is clickable. And what makes it worse is I have just spent 2 hours
> > pulling my hair out on google with no results, as is usual when dealing
> > with
> > Visual Studio issues. It's times like this that I SOOOOOOO REGRET not
> > learning UNIX/JAVA instead!!!!!!!!!
> > Please help me, if for anything, the $1,000's of dollars that I have spent
> > on MSDN subscriptions!
>
Re: WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 20.01.2008 21:46:23 von smar
You should not have to manually create any event handler sub under any
circumstance.
After adding the control to your page, just double-click it. This will take
you to code view and VS will create an event handler for you. If it is not
the correct event handler (VS uses the default event of any control, so it
doesn't always guess correctly), just pull down the event dropdown listbox
in the top, right of the code editor and select the correct event. As soon
as you do that, VS will create the correct event handler stub for you.
That's all you have to do. You really don't need to worry about
AutoEventWireUp or Handles - VS takes care of it for you.
-Scott
"pickedaname" wrote in message
news:210575FE-3B8E-4EC3-BB04-2E7A1A035A30@microsoft.com...
>
> Hi Scott,
> I was trying to add a MultiMenu control to a test page (I want to test
> before I move it to the production master page) within the same site. I
> cannot handle events for this control. in the code behind, when I create a
> sub for the multiMenu1_MenuItemClicked, the "Handles MultiMenu1.Clicked"
> portion is underlined. "Handles clause requires a withevents variable
> defined
> in the containing type or one of its base types." So what you are saying
> is
> if I create a sub
> MultiMenu1_MenuItemClicked Sub without the Handles clause and
> autoeventwireup is true it will create this on the fly. The question is,
> am I
> free to create this sub in the code behind file, where the others are, or
> must I insert this into a script block in the .aspx file? Thanks.
>
> "Scott M." wrote:
>
>> You've most likely made an ASP .NET Web "Site", rather than an ASP .NET
>> "Web
>> Application Project" (only available in VS 2005 SP1 or VS 2008).
>>
>> With web "sites", there is no .designer.vb file because the code is
>> dynamically compiled when it is called. You'll notice that in the Page
>> Directives (in the .aspx source code) that the AutoEventWireUp directive
>> is
>> set to true, this means that as long as your event handler names are a
>> combination of the control name, an underscore and the event name, along
>> with appropriate parameters, the event will automatically "wire up" to
>> the
>> event handler.
>>
>> Any controls you put on your page are created "declaratively" and so, no
>> .NET code actually exists for them at design-time.
>>
>> What is it that you need to do that you can't do with this model?
>>
>> -Scott
>>
>>
>> "pickedaname" wrote in message
>> news:38C8C6DE-B087-4BAF-A545-30FE1361E30E@microsoft.com...
>> >I am so frustrated, as is USUAL using Visual Studio.
>> > NONE, NOOOOONE of my aspx files have associated designer.vb files
>> > available
>> > (And yes, they all have the .vb code behind files).
>> > All of my aspx files were created with the seperate code file option. I
>> > never needed to access the designer files before, so I have no idea if
>> > they
>> > were ever there. If they are not, how are events being wired up? They
>> > MUST
>> > be
>> > present. Now that I DO need them, I cannot access them at all. I have
>> > tried
>> > clicking the "show all files" in solution exporer, which is always
>> > dimmed
>> > out
>> > but is clickable. And what makes it worse is I have just spent 2 hours
>> > pulling my hair out on google with no results, as is usual when dealing
>> > with
>> > Visual Studio issues. It's times like this that I SOOOOOOO REGRET not
>> > learning UNIX/JAVA instead!!!!!!!!!
>> > Please help me, if for anything, the $1,000's of dollars that I have
>> > spent
>> > on MSDN subscriptions!
>>
RE: WHERE IS *.ASPX.DESIGNER.VB FILES???????
am 21.01.2008 08:09:16 von wawang
Hi pickedaname,
Which version of Visual Studio are you using?
I believe you probably are using the Web Application Project instead of
Website mode (which is introduced since Visual Studio 2005) since the
toolbar button "Show All Files" is not available in website mode.
For AutoEventWireup, it's recommended to set to "false" for performance
reason:
ASP.NET Server Control Event Model
(http://msdn2.microsoft.com/en-us/library/59t350k3(VS.71).as px)
If the AutoEventWireup attribute of the Page directive is set to true (or
if it is missing, since by default it is true), the page framework calls
page events automatically, specifically the Page_Init and Page_Load
methods. In that case, no explicit Handles clause or delegate is needed.
The disadvantage of the AutoEventWireup attribute is that it requires that
the page event handlers have specific, predictable names. This limits your
flexibility in how you name your event handlers. Therefore, in Visual
Studio, the AutoEventWireup attribute is set to false by default and the
designer generates explicit code to bind page events to methods.
If you do set AutoEventWireup to true, Visual Studio will generate code to
bind the events and the page framework will automatically call events based
on their names. This can result in the same event code being called twice
when the page runs. As a consequence, you should always leave
AutoEventWireup set to false when working in Visual Studio.
Hocke - Thoughts, Tutorials, Tips and Tricks: AutoEventWireup=true
(http://hocke.blogspot.com/2007/07/autoeventwireuptrue.html)
Hope this helps.
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.