zoukankan      html  css  js  c++  java
  • 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">

  • 相关阅读:
    docker log
    byte转String防止乱码
    SQL索引
    Redis 总结精讲
    如何保证消息队列是高可用的
    消息中间件(一)MQ详解及四大MQ比较
    @Bean和@Componet区别
    理解Spring的AOP和Ioc/DI就这么简单
    SpringBoot 基础
    《Linux 鸟哥私房菜》 第6章 Linux的文件权限与目录配置
  • 原文地址:https://www.cnblogs.com/pengfeiwang/p/4373651.html
Copyright © 2011-2022 走看看