Using immediate window

  • Thread starter Thread starter sck10
  • Start date Start date
S

sck10

Hello,

Can someone provide a simple example of how to use the immediate window with
ASP.NET? No matter what I type, I get the following statement: The
expression cannot be evaluated while in design mode.

Thanks, sck10
 
You need to be stepping through the page in debug mode, not design mode. Try
these steps:

1. Set a breakpoint at

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

2. Execute the page in debug mode.
3. When the breakpoint is hit, in the Immediate window, type this command:

? request.ServerVariables("script_name")

4. Press enter. You should see the name of the script that you are executing
in the Immediate window.

Does this help?

Ken
Microsoft MVP [ASP.NET]
 
Thanks Ken, yes this helps much...


Ken Cox said:
You need to be stepping through the page in debug mode, not design mode.
Try these steps:

1. Set a breakpoint at

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)

2. Execute the page in debug mode.
3. When the breakpoint is hit, in the Immediate window, type this command:

? request.ServerVariables("script_name")

4. Press enter. You should see the name of the script that you are
executing in the Immediate window.

Does this help?

Ken
Microsoft MVP [ASP.NET]



sck10 said:
Hello,

Can someone provide a simple example of how to use the immediate window
with ASP.NET? No matter what I type, I get the following statement: The
expression cannot be evaluated while in design mode.

Thanks, sck10
 
Back
Top