dotnetnuke 头像调用 头像缩放
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">