Home > Web Front-end > JS Tutorial > Summary of several return methods for calling HttpHanlder_jquery

Summary of several return methods for calling HttpHanlder_jquery

WBOY
Release: 2016-05-16 17:08:16
Original
1250 people have browsed it

1: If you only need to return string form, such as content, JSON string array, etc.

context.Response.Write(resultPrice.ToString());

2: If you want to return the image, use the form of stream

bitmap.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);

3: If a file is returned, such as a txt document, it is provided to the client for download

context.Response.WriteFile("Text instance.txt");

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template