Click here to Skip to main content
16,021,041 members

Comments by Member 11932995 (Top 11 by date)

Member 11932995 23-Oct-15 4:04am View    
thanks ,i followed your suggestions but now it is showing This webpage has a redirect loop error...and also this is not even restricting direct url access ...please help
this is my code,
if (!IsPostBack)
{
if (Session["DNA"] != null)
{
Response.Redirect("loginpage.aspx");

}
else
if(!HttpContext.Current.Request.Path.EndsWith("aboutus.aspx", StringComparison.InvariantCultureIgnoreCase))
Response.Redirect("aboutus.aspx");


}
so here this code is restricting direct url access but on logged in successfully while accessing directly it should redirect to about us page but instead it is redirecting and be in aloop of showing index page as the login page code is:
protected void btn_login_Click(object sender, EventArgs e)
{
if (Session["DNA"] != null)
{
string wrng_uname = "Enter the correct Username !";
string wrng_pswrd = "You Have Entered WRONG password !";

if (txt_uname.Text != "DNA")
{
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + wrng_uname + "');", true);
}
else
if (txt_uname.Text == "DNA" && txt_password.Text != "qwaszx123")

ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + wrng_pswrd + "');", true);

else
if (txt_uname.Text == "DNA" && txt_password.Text == "qwaszx123")
{
Response.Redirect("index.aspx");

}
}

}
Member 11932995 13-Oct-15 9:03am View    
yes actually there are so many images and so many companies so i just want to store these images systematically in the folder structure
Member 11932995 6-Oct-15 1:39am View    
thanks all...finally i fixed this....thanks lottttt:)
Member 11932995 3-Oct-15 1:27am View    
yup i have gone through this but how to do it exactly i am new to asp.net so please tell me steps so that i can implement it actually
Member 11932995 22-Sep-15 9:01am View    
Thanks for replying my post....but i have already gone through these two links and tried to fix this accordingly but still this problem is not solved....:(