首页 > Web开发 > 详细

dotnetnuke 头像调用 头像缩放

时间:2015-03-28 10:04:57      阅读:152      评论:0      收藏:0      [点我收藏+]

        public static string GetProfileImage(int userId, int width, int height)
        {         
            return "~/profilepic.ashx?userid=" + userId.ToString() + "&w=" + width.ToString() + "&h=" + height.ToString();
        }

 

 

参与网站

http://www.ventrian.com/blog/getting-user-profile-image-paths-in-dotnetnuke

Luckily, this is a fairly trivial task with DotNetNuke:

protected string GetProfileImage(int userId)
{
    return Page.ResolveUrl("~/profilepic.ashx?userid=" + userId.ToString());
}

By default, it looks to be restricted to a maximum width and height of 55px. However, you can pass in parameters to control the width & height.

protected string GetProfileImage(int userId, int width, int height)
{
    return Page.ResolveUrl("~/profilepic.ashx?userid=" + userId.ToString() & "&w=" & width.ToString() & "&h=" & height.ToString());
}


http://www.ventrian.com/blog/better-profile-pictures-in-dotnetnuke
<img alt="Profile Avatar" src="/profilepic.ashx?userId=[USER:USERID]&h=64&w=64" width="64" height="64">

dotnetnuke 头像调用 头像缩放

原文:http://www.cnblogs.com/pengfeiwang/p/4373651.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!