TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Max Tenenbaum
NA
33
47.8k
This web page has a redirect loop
Aug 19 2011 6:05 AM
Hi,
Can someone inspect the following code and tell me why I am getting the following error message:
"This web page has a redirect loop"
Code behind: proposal.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
ActiveDirectoryHelper.ActiveDirectoryHelper adh = new ActiveDirectoryHelper.ActiveDirectoryHelper();
string loginName = Page.User.Identity.Name.Split('\\')[1];
ADUserDetail ThisUser = adh.GetUserByLoginName(loginName);
if (ThisUser.Company == "co1)")
{
Response.Redirect("Proposal.aspx?Company=One");
}
else if (ThisUser.Company == "co2")
{
Response.Redirect("Proposal.aspx?Company=two");
}
else if (ThisUser.Company == "co3")
{
Response.Redirect("Proposal.aspx?Company=three");
}
}
Main page: proposal.aspx
<%
string Company = Request.QueryString["Company"];
switch (Company)
{
case "one":
Response.Write("Proposal content is for Company1");
break;
case "two":
Response.Write("Proposal content is for Company2");
break;
case "three":
Response.Write("Proposal content is for Compnay3");
break;
}
%>
Reply
Answers (
6
)
How to find total number of word in a text file in vb.net
Opening second tabpage when a form is called