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

  • 相关阅读:
    babel初学教程
    手机cs端改变跳转方式
    web.xml 中的listener、 filter、servlet 加载顺序及其详解
    Linux下cp直接覆盖不提示的方法!
    JAVA中用CALENDAR类计算周和周的起始日期(转)
    [android反编译小结]apktool/ AXMLPrinter2.jar/ dex2jar.bat/ jdgui/
    jquery 新手学习常见问题解决方法
    Linux系统中gb2312与utf8相互切换
    xml解析循环参数实例
    java 计算时间差
  • 原文地址:https://www.cnblogs.com/pengfeiwang/p/4373651.html
Copyright © 2011-2022 走看看