码迷,mamicode.com
首页 > Web开发 > 详细

dotnetnuke 头像调用 头像缩放

时间:2015-03-28 10:05:16      阅读:128      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!