推薦: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是否可用或可見的小例子,需要的朋友可以參考一下
新聞熱點
疑難解答
圖片精選