Пример #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            BIndex bI   = new BIndex();
            string json = bI.Index();

            context.Response.Write(json);
        }
Пример #2
0
        public void ProcessRequest(HttpContext context)
        {
            BIndex     bi            = new BIndex();
            string     AttractionsID = context.Request["AttractionsID"];
            string     result        = bi.GetImage(AttractionsID);
            string     Path          = context.Server.MapPath(result);
            FileStream fs            = new FileStream(Path, FileMode.Open);

            byte[] byData = new byte[fs.Length];
            try
            {
                fs.Read(byData, 0, byData.Length);
            }
            catch (Exception ex)
            {
            }
            finally
            {
                fs.Close();
            }

            context.Response.BinaryWrite(byData);
        }