• 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">

  • 相关阅读:
    error: gnu/stubs32.h: 没有那个文件或目录
    vim配色方案
    Linux文件合并、去除重复
    Debian网络安装中的驱动问题
    汽油、柴油标号
    Debian SSH登录慢的解决办法
    Debian下的时间和时区问题
    解决vim、gvim在windows下中文乱码
    使用本地Debian ISO镜像作为网络安装源
    Debian如何永久添加静态路由
  • 原文地址:https://www.cnblogs.com/pengfeiwang/p/4373651.html
Copyright © 2020-2023  润新知