Re: Page_Load & ButtonClick?
- From: "Scott M." <s-mar@xxxxxxxxxxxxx>
- Date: Wed, 26 Jul 2006 09:45:38 -0400
You many not have debugging enabled for the site you are working with.
Check your web.config file, there should be a line in there that looks like
this:
<compilation debug="true" strict="false" explicit="true"/>
Notice: debug="true"
I have create a new test ASP.NET site. I added one button to the aspx page
and then in the Page_Load and the Button_Click event handlers, I have
written one simple line of code (to have something to set a breakpoint on).
I set 2 breakpoints (one inside of each handler) and press F5.
Because my web.config file was not set up for debugging (the default), I was
prompted to see if I wanted it to be automatically turned on for me, I
answered "Ok".
That's it, the application runs and then stops at my breakpoint. With the
exception of web.config (which didn't exist in VB 6.0). The procedure is
exactly the same as it was in VB 6.0.
I don't know why Start Debugging is greyed out. Does F5 (same thing) do
anything for you? Also, don't use "View In Browser". F5 does the same
thing but with debugging enabled.
Have you changed anything else about the project's settings?
"Arpan" <arpan_de@xxxxxxxxxxx> wrote in message
news:1153887966.746503.166280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
You don't start the app and then press F5. You press F5 to start the app
in
debug mode.
But I always find the "Start Debugging" menu item under the "Debug"
menu as well as the "Start Debugging" icon on the toolbar disabled. How
do I enable it?
Arpan
Scott M. wrote:
You don't start the app and then press F5. You press F5 to start the app
in
debug mode. Same as in VB 6.0. Hasn't changed at all.
"Arpan" <arpan_de@xxxxxxxxxxx> wrote in message
news:1153878923.248814.35040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Set your breakpoint and press F5. Stepping works as it did in VB 6.0.
When should F5 be pressed? I set a breakpoint for a sub named btn_Click
(Click event function of a Button). After running the ASPX page in the
browser & without clicking the Button, I came back to the VWD IDE &
pressed F5 but that didn't do the stepping! I again went back to the
browser, clicked the Button, came back to the VWD IDE & pressed F5 but
that didn't step over the code. I even tried pressing F5 in the VWD IDE
without running the ASPX page in a browser but that didn't step over
the code as well. At what point should I press F5?
Arpan
Scott M. wrote:
Set your breakpoint and press F5. Stepping works as it did in VB 6.0.
"Arpan" <arpan_de@xxxxxxxxxxx> wrote in message
news:1153868960.680505.239510@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Scott, thanks for the response. Prior to posting my query, I had
tried
setting breakpoints but I guess breakpoints in Visual Web Developer
2005 doesn't work in the same way as how breakpoints work in VB6.
In VB6, suppose a breakpoint is set on the Click event function of,
say, a CommandButton. Now as soon as the CommandButton is clicked
when
the app is executed from the VB IDE, focus shifts back to the VB IDE
&
pressing F8 steps over each & every line within the Click event
function of the CommandButton but setting a breakpoint on a sub in
the
VWD IDE doesn't behave in the same way. The focus doesn't shift back
to
the VWD IDE; in fact nothing happens when a sub which has been
"breakpointed" gets executed when the ASPX page is run in IE (or any
other browser) from the VWD IDE (by clicking the "View in Browser"
button).
So how do I step over each & every line within a sub in VWD? In
other
words, how do I utilize the breakpoint feature in VWD 2005?
Thanks once again,
Regards,
Arpan
P.S.: Are you Scott Mitchell, by any chance?
Scott M. wrote:
A simple test would be to set breakpoints in each event handler and
see
for
yourself that Page_Load executes first.
"Arpan" <arpan_de@xxxxxxxxxxx> wrote in message
news:1153865604.974388.284090@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
When a Button is clicked in a Web Form in an ASPX page, the Form
will
post back to itself. Under such circumstances (i.e. when a Button
is
clicked), will the Page_Load sub execute first & then will the
Click
event function of the Button execute or will the Click event
function
of the Button execute first & then will the Page_Load sub
execute?
Thanks,
Arpan
.
- References:
- Page_Load & ButtonClick?
- From: Arpan
- Re: Page_Load & ButtonClick?
- From: Scott M.
- Re: Page_Load & ButtonClick?
- From: Arpan
- Re: Page_Load & ButtonClick?
- From: Scott M.
- Re: Page_Load & ButtonClick?
- From: Arpan
- Re: Page_Load & ButtonClick?
- From: Scott M.
- Re: Page_Load & ButtonClick?
- From: Arpan
- Page_Load & ButtonClick?
- Prev by Date: RE: Run app as specified user from ASP.NET 2.0
- Next by Date: Re: ASP.Net V 2.0 problems with sending email
- Previous by thread: Re: Page_Load & ButtonClick?
- Next by thread: Re: Page_Load & ButtonClick?
- Index(es):