?? myhandler.cs
字號:
?using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// MyHandler 的摘要說明
/// </summary>
public class MyHandler:IHttpHandler
{
public MyHandler()
{
//
// TODO: 在此處添加構造函數邏輯
//
}
#region IHttpHandler 成員
public bool IsReusable
{
get { throw new Exception("The method or operation is not implemented."); }
}
public void ProcessRequest(HttpContext context)
{
int i = context.Request.RawUrl.LastIndexOf("?");
string path = context.Request.RawUrl.Substring(i);
int n = path.IndexOf("=");
string catid = path.Substring(1, n - 1);
string id = path.Substring(n + 1);
string[] arg = id.Split(new char[] { '*' });
string loginName = context.User.Identity.Name;
Model.User user = new Model.User();
user.LoginName = loginName;
user.Pwd = arg[1];
user.DisPlay = arg[0];
user.Contact= arg[2];
user.Tel = arg[3];
Business.BUser userOp = new Business.BUser();
try
{
userOp.ModifyUserInfo(user);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}
#endregion
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -