usermodify.aspx
资源名称:论坛源码.rar [点击查看]
上传用户:scene123
上传日期:2010-02-19
资源大小:3311k
文件大小:2k
源码类别:
.net编程
开发平台:
C#
- <% @ Page Language="C#" %>
- <% @ Import Namespace="System.Data" %>
- <% @ Import Namespace="System.Data.OleDb" %>
- <Script Language="C#" Runat="Server">
- OleDbConnection MyConn;
- OleDbCommand com_modify;
- public String UserName;
- public String Pass;
- public String Sex;
- public String mail;
- public String QQ;
- public String Loca;
- public String Sign;
- public String sql_adduser;
- public String sql_check;
- public int check=0;
- public String er;
- public string face;
- public string face_url;
- public string head_type;
- public int width;
- public int height;
- public string HeadImg;
- public void Page_Load(Object src,EventArgs e)
- {
- UserName=Request.Form["UserName"];
- Pass=Request.Form["PassWord"];
- Sex=Request.Form["Sex"];
- mail=Request.Form["mail"];
- QQ=Request.Form["QQ"];
- Loca=Request.Form["Location"];
- Sign=Request.Form["Sign"];
- head_type=Request.Form["head_type"];
- width=Int32.Parse(Request.Form["width"].ToString());
- height=Int32.Parse(Request.Form["height"].ToString());
- face=Request.Form["face"];
- if (head_type=="1"){
- HeadImg=face;
- }
- else {
- HeadImg=""+face_url;
- }
- HeadImg=HeadImg.Replace("'","''");
- //连接语句
- string MyConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+Server.MapPath(".")+"..\DataBase\ld1.mdb;";
- //定义sql语句
- sql_modify="update usertable set Pass='"+Pass+"',sex="+sex+",mail='"+mail+"',QQ="+QQ+",Loca='"+Loca+"',Sign='"+Sign+"',width="+width+",height="+height;
- MyConn = new OleDbConnection(MyConnString);
- MyConn.Open();
- OleDbCommand com_modify = new OleDbCommand(sql_modify,MyConn);
- com_add.ExecuteNonQuery();
- </script>
- <html>
- <head>
- <title></title>
- <link href="css/css.css" rel="stylesheet" type="text/css">
- </head>
- <body class=ziti>
- </body>
- </html>