![](/img/trans.png)
[英]When I try to load image from mysql database i get error “Parameter is not valid” and when i try to load an image from db
[英]When I try to show an image on linklabel click, I get an error
當我嘗試在linklabel單擊上顯示圖像時,出現錯誤:無法識別的轉義序列。
碼:
public void linkLabel1_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start(
"mspaint~C:\Users\Joshua Banks\Desktop\Downtown_atlanta_night.jpg");
}
您需要通過用另一個\\轉義或使用逐字字符串來轉義字符串(圖像路徑)中的\\字符。
轉義字符:
System.Diagnostics.Process.Start("mspaint~C:\\Users\\Joshua Banks\\Desktop\\Downtown_atlanta_night.jpg");
逐字字符串文字:
System.Diagnostics.Process.Start(@"mspaint~C:\Users\Joshua Banks\Desktop\Downtown_atlanta_night.jpg");
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.