废话不多说了,直接给大家贴代码了,具体代码如下所示:
reg.ashx代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebT1.Ti.html2
{
///
/// reg 的摘要说明
///
public class reg : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
if (context.Request["email"] != null)
{
string strEmail = context.Request["email"];
List lstUser = DataService.GetUserList();
var v = lstUser.Where(p => p.Email == strEmail);
int iCount = 0;
if (v.Count() > 0)
{
iCount = 1;
}
context.Response.ContentType = "text/plain";
context.Response.Write(iCount.ToString());
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
public class DataService
{
///
/// 模拟已注册用户数据
///
public static List GetUserList()
{
var list = new List();
list.Add(new UserModel() { Email = "[email protected]" });
list.Add(new UserModel() { Email = "[email protected]" });
list.Add(new UserModel() { Email = "[email protected]" });
list.Add(new UserModel() { Email = "[email protected]" });
list.Add(new UserModel() { Email = "[email protected]" });
return list;
}
}
public class UserModel
{
public string Email { get; set; }
}
}
疯狂医院达什医生中文版(Crazy Hospital)
疯狂医院达什医生最新版是一款医院模拟经营类游戏,逼真的场景画
宝宝庄园官方版
宝宝庄园官方版是一款超级经典好玩的模拟经营类型的手游,这个游
桃源记官方正版
桃源记是一款休闲娱乐类的水墨手绘风格打造的模拟经营手游。玩家
长途巴士模拟器手机版
长途巴士模拟器汉化版是一款十分比真好玩的大巴车模拟驾驶运营类
房东模拟器最新版2024
房东模拟器中文版是一个超级有趣的模拟经营类型的手游,这个游戏