- Dạng text / html
Response.Clear();
Response.ContentType = "text/HTML";
Response.Write(ff);
Response.End();
- Dạng json
Response.Clear();
Response.ContentType = "application/json";
Response.Write(ff);
Response.End();
- Dạng xml
Response.Clear();
Response.ContentType = "text/xml";
Response.Write(ff);
Response.End();
Ví dụ:
protected void Page_Load(object sender, EventArgs e)
{
Response.Clear();
Response.ContentType = "text/HTML";
Response.Write("noi dung");
Response.End();
}
Cấu trúc file Aspx trả về cho Ajax