如何在用户登录后添加个人资料图片 [英] How can I add profile pic after user login

查看:95
本文介绍了如何在用户登录后添加个人资料图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户登录时我想显示他的个人资料照片,但在数据库中我只存储该图像的路径而不是实际图像,所以如何在登录后添加个人资料照片。



我的尝试:



when the user logs in i want to show his profile pic,but in database i am only storing the path of that image not the actual image ,so how can i add profile pic after login.

What I have tried:

imgPofilePic.ImageUrl = Convert.ToString(Session["ProfilePic"]);

推荐答案

许多人经常在数据库中存储图像的路径。所以,你要做的就是创建一个图像并将src设置为图像的url。非常简单。
Many people often store the path to the image in the database. So, all you do is create an image and set the src to be the url of the image. Pretty simple.


这篇关于如何在用户登录后添加个人资料图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆