i have many pages in my site with master page .
every page commit with master page . i have a login window in master page ..its work every page perfect .
but when i url rewrite of serch page then he work perfect when url rewrite .
easyshiksha/engineering
rewrite
http://easyshiksha.com/search.aspx?q=&loc=&course_level=&course_map1=btech &course_map2=&states=1
but when i going with previous url with query string there login not work no error there. only end of url write see #stq&stp=1
my master page code for login he is in master page ..
protected void m_log_Click(object sender, EventArgs e)
{
ds = new DataSet();
string sql2 ="Select * From user_Information where email=@email2 and password=@password2 ";
cmd2 = new SqlCommand(sql2);
cmd2.Parameters.AddWithValue("@email2", m_email_signin.Value);
cmd2.Parameters.AddWithValue("@password2", m_password_signin.Value);
ds = obj.selectds1(cmd2, "user_Information");
//ds = obj.select("Select * From user_Information where email='" + m_email_signin.Value + "' and password='" + m_password_signin.Value + "'", "user_Information");
if (ds.Tables["user_Information"].Rows.Count > 0)
{
HttpCookie login = new HttpCookie("user_login");
login.Value = ds.Tables["user_Information"].Rows[0]["user_id"].ToString();
login.Expires = DateTime.Now.AddYears(1);
Response.Cookies.Add(login);
// string choice = HttpUtility.UrlEncode(Encrypt(ds.Tables[0].Rows[0]["education_interest"].ToString()));
string choice = ds.Tables[0].Rows[0]["education_interest"].ToString();
//Response.Redirect(string.Format("users.aspx?q={0}&loc=&course_level=&course_map1=&course_map2=", choice));
Response.Redirect("users.aspx?q="+choice+"&loc=&course_level=&course_map1=&course_map2=");
}
else { inc_login.Style.Add("display", "inline"); showp.Style.Add("display", "none"); }
}
url rewrite
<rule name="Rewrite Rule">
<match url=".*" />
<conditions>
<add input="{StaticRewrites:{PATH_INFO}}" pattern="(.+)" />
</conditions>
<action type="Rewrite" url="{C:1}" />
</rule>