aspx小试

    一直对asp.net编程比较抵触,多次接触都没怎么搞懂,今天派一任务,顿时头大了。

做一个页面,根据参数展示图片

protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"];

        if (string.IsNullOrEmpty(id) == false)
        {
            id = id.Replace('|', '\\');
        }

        m_Image.ImageUrl = "\\\\127.0.0.1\\" + id;
    }

发布一下,直接访问

http://127.0.0.1/default.aspx?id=1134716.jpg

原文地址:https://www.cnblogs.com/sshoub/p/2720453.html