Using immediate window

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
 
K

Ken Cox [Microsoft MVP]

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]
 
S

sck10

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top