I have a default.aspx page like this with the goal of redirecting differently based on the host header.
<%
if(System.Web.HttpContext.Current.Request.Url.Host == "xxx.xxx.com")
{
response.redirect ("place/subplace/xxx.aspx")
}
else
{
response.redirect ("place/xxx.aspx")
}
%>
but it is giving me the error “Compiler Error Message: BC30201: Expression expected.”
What am I doing wrong?
In C# expressions are terminated with a semicolon
;and C# is case-sensitive. Both
ResponseandRedirectstart with a capital letter.Edit: Since you now tagged this as VB.Net
Your code is no valid VB.net code. If it were it should read like the following: