推荐:CheckBoxList两列并排编译为表格显示具体实现CheckBoxList两列并排的显示效果相比大家都有见到过吧,下面是具体的实现代码,感兴趣的朋友可以参考下哈
System.Drawing.Bitmap img = new System.Drawing.Bitmap(imgPhoto,
int.Parse(toImgWidth.ToString()),
int.Parse(toImgHeight.ToString()));
string strResizePicName = Server.MapPath(strImgPath) + filePathName + "/_small_" + fileSysName;
img.Save(strResizePicName); //保存压缩后的图片
filePath = strImgPath + filePathName + "/_small_" + fileSysName; //返回压缩后的图片路径
}
}
else
{
if (imgHeight > maxHeight)
{
float toImgHeight1 = maxHeight;
float toImgWidth1 = imgWidth / (float)(imgHeight / toImgHeight1);
System.Drawing.Bitmap img = new System.Drawing.Bitmap(imgPhoto,
int.Parse(toImgWidth1.ToString()),
int.Parse(toImgHeight1.ToString()));
string strResizePicName = Server.MapPath(strImgPath) + filePathName + "/_small_" + fileSysName;
img.Save(strResizePicName);
filePath = strImgPath + filePathName + "/_small_" + fileSysName;
}
}
}
return filePath;
#endregion
}
分享:GridView中动态设置CommandField是否可用或可见的小例子GridView中动态设置CommandField是否可用或可见的小例子,需要的朋友可以参考一下
新闻热点
疑难解答
图片精选