日期:2014-05-16 浏览次数:20405 次
$("#deleteattachment").click(function () {
var Requeststr=$("#<%=Label_LibNewsID.ClientID %>").attr("value");
$.ajax({
type: "POST",
contentType: "application/json;charset=utf-8",
url: "Handler.ashx?FilePath=" + $(this).prev().attr("href"),
data: { LibNewsID: Requeststr },
dataType: 'text',
success: function (result) {
alert(result);
},
error: function (a, s, d) {
alert(s + " " + d);
}
});
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
string LibNewsID = context.Request.Form["LibNewsID"];
LibNewsID = context.Request["LibNewsID"];
LibNewsID = context.Request.Params["LibNewsID"];
string json = new System.IO.StreamReader(context.Request.InputStream).ReadToEnd();
context.Response.Write(json);
}
data: "{LibNewsID:'" +Requeststr + "'}",