| |

VerySource

 Forgot password?
 Register
Search
View: 1673|Reply: 15

Newcomer session issues

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-14 12:30:01
| Show all posts |Read mode
Put the registered user's avatar in the session: Session ["img"] = img; and when reading the avatar string img = Session ["img"]. ToString (); the value obtained is "img" instead of my picture route of. . What's the matter? ?
Reply

Use magic Report

0

Threads

60

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-6-11 13:30:01
| Show all posts
I don't know what you saved, it is best to save the picture path
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-6-12 15:00:01
| Show all posts
It's already tostring(), maybe it's a picture, it's better to store a path upstairs
Reply

Use magic Report

0

Threads

43

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-6-12 22:15:01
| Show all posts
Let's see what the value is in mode
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Korea, Republic of

Post time: 2020-6-13 01:00:01
| Show all posts
There is a problem with the img value, you can try to assign the value directly
Session["img"] ="xxx/xx"
Reply

Use magic Report

0

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-6-13 12:30:02
| Show all posts
See what you saved
It is best to store the URL in Session["img"]
Reply

Use magic Report

0

Threads

23

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-6-13 15:30:01
| Show all posts
Session["img"]=What is the value of img in img
Reply

Use magic Report

0

Threads

17

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-6-16 21:15:01
| Show all posts
Save path
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-17 10:45:01
| Show all posts
Yes maybe
Session["img"]=The value of img in img is wrong

Try adding an extra line
string img="c:/ddd.jpg"
Reply

Use magic Report

0

Threads

8

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-6-18 12:30:01
| Show all posts
First find a picture path and assign it to SESSION and then do the debugging to see if it can be obtained. If it is possible, you have a problem with the assignment variable
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