| |

VerySource

 Forgot password?
 Register
Search
View: 756|Reply: 4

[Basic question] Query string

[Copy link]

5

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-12-14 15:00:01
| Show all posts |Read mode
albumId = Request.QueryString["AlbumID"];
ownerName = Request.QueryString["OwnerName"];

After setting the breakpoint, the Request.QueryString value is aa.aspx?AlbumID=1&OwnerName=a

Why are the values ​​of albumId and ownerName both null ???

I am very good, thank you everyone!
Reply

Use magic Report

0

Threads

64

Posts

45.00

Credits

Newbie

Rank: 1

Credits
45.00

 China

Post time: 2020-12-14 17:00:01
| Show all posts
Try it with Request.Params["AlbumID"];
Reply

Use magic Report

0

Threads

5

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-12-14 17:45:01
| Show all posts
Request.QueryString value is aa.aspx?AlbumID=1&OwnerName=a ????

Doesn't it seem right?

aa.aspx?AlbumID=1&OwnerName=a is a path,
And AlbumID=1&OwnerName=a is Request.QueryString.

Hug will not be written like this:
aa.aspx?aa.aspx?AlbumID=1&OwnerName=a
Reply

Use magic Report

2

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-12-14 23:15:01
| Show all posts
It should be two&&,

aa.aspx?AlbumID=1&&OwnerName=a



albumId = Request.QueryString["AlbumID"].ToString;
ownerName = Request.QueryString["OwnerName"].ToString;
Reply

Use magic Report

2

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-12-15 00:00:01
| Show all posts
ToString(); add();
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