Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have one folder Admin, In Admin folder i have one page Section.aspx page.

In the main root directory, i have one page customer.aspx page.

In customer.aspx page, i have one button, when i clcked that i want to redirected to Section.aspx page that is in Admin Folder.

C#
Protected void Button1_Click(object sender,EventArgs e)

{

Response.Redirect("Admin/Section.aspx?SelectedValue=Admin");

}


When i click the Button it is redirecting to Home.aspx page...and in the Browse i am getting the url like this:

localhost/Home.aspx?ReturnUrl=%2fAdmin%2fSection.aspx%3fSelectedValue%3dAdmin&SelectedValue=Admin

But in the Same Button when i redirected to some other page it redirecting,but in the above page i.e Section.aspx it is not redirecting.

In section.aspx page:

we are displaying some values in the Grid.

Thanks,
Posted
Updated 15-Mar-12 14:47pm
v2
Comments
Sudip Saha 16-Mar-12 0:40am    
I think form authentication,role, is given and you are not authencated user thats why .. check web config and verify

There is no error in you code. but i think you have write something in your Section.aspx LOAD event. that code will re redirect you to your home page.
please check your section page code,the fault will in that form.
 
Share this answer
 
try this

C#
Protected void Button1_Click(object sender,EventArgs e)

{

Response.Redirect("~/Admin/Section.aspx?SelectedValue=Admin");

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900