Exemplo n.º 1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";

            string t = context.Request.Form["d"];

            if (string.IsNullOrEmpty(t))
            {
                context.Response.Write("");
                return;
            }



            try
            {
                string _Key            = Guid.NewGuid().ToString();
                MongoLib.MongoUtil2 MU = new MongoLib.MongoUtil2();

                MU.Add(new Link
                {
                    Key  = _Key,
                    Data = t
                });

                context.Response.Write(_Key);
            }
            catch
            {
                context.Response.Write("");
                return;
            }
        }
Exemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/html";

            string p = context.Request.Form["p"];

            try
            {
                MongoLib.MongoUtil2 MU = new MongoLib.MongoUtil2();

                Link L = MU.Find(p);

                context.Response.Write(L.Data);
            }
            catch
            {
                context.Response.Write("");
                return;
            }
        }