How can I redirect to a special page with query string via web method

nickpou

New Member
I wrote a web method function for login page. When a user successfully authenticates to a server I want to redirect him to a special page with specified va\[code\][WebMethod]public static string loginmtd(string username, string password , string chk){ datatable dt=filltable();//for bring data if (dt.Rows.Count==1) { if (chk == "ok") { HttpCookie cook = new HttpCookie("userauth"); cook["user"] = usern; cook["pass"] = passw; HttpContext.Current.Response.Expires = 60000; HttpContext.Current.Response.AppendCookie(cook); } HttpContext.Current.Response.Redirect("master.aspx?uid=" + username); return result; } else { result = "no"; }}\[/code\]
 
Back
Top