| |

VerySource

 Forgot password?
 Register
Search
View: 1290|Reply: 12

How can I find out if a variable has a value?

[Copy link]

4

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-21 11:20:01
| Show all posts |Read mode
I am using vb.net to make a website. There is a sentence in the foreground code: <% = theTitle%> How can I debug to know if this variable has a value? , I directly press F5 without error, but this variable is not displayed, I can't figure it out. Masters talk about vs debugging, the more detailed the better.
Reply

Use magic Report

1

Threads

18

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-1-30 19:54:01
| Show all posts
<% =%> This seems to be invisible under debug. I haven't tried it, but I can put output like ":" before and after it.
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-30 23:27:01
| Show all posts
Set breakpoints in VS, just look at the breakpoints
Reply

Use magic Report

0

Threads

73

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-1-31 00:00:01
| Show all posts
In VS, set a breakpoint at theTitle assignment statement to see if it will be executed there. If it is executed, you can directly see its value
Reply

Use magic Report

0

Threads

12

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-3-13 22:00:02
| Show all posts
You can set a breakpoint to see the value of the variable, or you can use alert (<% = theTitle%>) on the client.
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-3-14 16:45:01
| Show all posts
<% = theTitle%> Set the interrupt (F9) on the next statement, then debug (F5), right-click on theTitle after running-> Quick Monitor
Reply

Use magic Report

0

Threads

7

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-15 12:45:01
| Show all posts
The webpage can only be interrupted
Reply

Use magic Report

4

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-4-17 21:00:01
| Show all posts
<% = theTitle%> In the foreground code, there is no way to set a breakpoint,
Reply

Use magic Report

4

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-4-18 13:45:01
| Show all posts
I added <script> </ script> to the foreground code, I also want to put the code in <script> </ script> in the background page, but in this way, <% = theTitle in the foreground code %> I did n’t report the error, what should I do?
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-4-21 21:30:02
| Show all posts
Then
response.write (theTitle)
response.end
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list