'redirect'에 해당되는 글 1건

  1. 2014.03.31 asp.net 로그인 (login)
ASP.NET2014. 3. 31. 17:30

 

string strUserId = txtID.Text;
strPwd = txtPW.Text;

// DB 에서 계정 확인 후 분기!

FormsAuthentication.SetAuthCookie(strUserId, false); // 인증
string url = FormsAuthentication.GetRedirectUrl(strUserId, false); // 첫 접속 주소 기억
Session["ID"] = ds.Tables[0].Rows[0]["ID"].ToString();
Session["NAME"] = ds.Tables[0].Rows[0]["NAME"].ToString();
Session["DEPT"] = ds.Tables[0].Rows[0]["DEPT"].ToString();
Session["EMAIL"] = ds.Tables[0].Rows[0]["EMAIL"].ToString();

Response.Redirect(url);

 

Posted by 댓거리사랑