1:如果只需要傳回字串形式的例如內容、JSON字串陣列等context.Response.Write(resultPrice.ToString()); 2:如要返回圖片,那麼採用流的形式bitmap.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); 3:如果傳回文件,例如txt文件提供給用戶端下載context.Response.WriteFile("文字實例.txt");