본문 바로가기

.NET/ASP.NET

ASP.NET 쿼리 스트링 QueryString 관련링크: http://personar95.springnote.com/pages/2357522

반응형

보내는쪽
string strUrl = "http://localhost:13259/QureyStringTest2/Main.aspx?id=ssogarif&pwd=비밀번호&div=divda"+ Server.UrlEncode("#");
// 특수기호 받기위해서 인코더
Response.Redirect(strUrl);








받는쪽
    protected void Page_Load(object sender, EventArgs e)
    {
if (!IsPostBack)
{
Label1.Text = Request.QueryString["id"];
Label2.Text = Request.QueryString["pwd"];
Label3.Text = Server.UrlDecode(Request.QueryString["div"]);
// 특수기호를 디코더해서 보여주기
Label3.Text = Request.QueryString["div"];
Label4.Text = Label1.Text;
}
    }