R
Reena
Hi,
code from .aspx page...
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
private void Page_Load(object sender, System.EventArgs e)
{
string strServerName =
Request.ServerVariables["SERVER_NAME"].ToUpper();
if (strServerName.IndexOf("LANT") <= 0) //Not Lant
//GETTING ERROR
{
if (strServerName.IndexOf("PAC") <= 0) //Not Pac
{
Response.Write ("<font size=2 face=Arial color=Red>To
access RADWeb site, please use one of the following...");
Response.Write ("<br><br>");
Response.Write ("<A
href='http://pac.com'>https://pac.com</a>");
Response.Write ("<br><br> OR <br><br>");
Response.Write ("<A
href='http://lant.com'>https://lant.com</a>");
Response.Write ("</font>");
Response.End();
}
}
}
-------------------------
Not getting any error while I am running the code. But if I step through the
code, watch window - value field displays 'strServerName.IndexOf' does not
exists.
Even if value is hardcode, strServerName = 'LANT', same error.
Help in this matter is greatly appreciated.
Thanks,
- Reena
code from .aspx page...
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
private void Page_Load(object sender, System.EventArgs e)
{
string strServerName =
Request.ServerVariables["SERVER_NAME"].ToUpper();
if (strServerName.IndexOf("LANT") <= 0) //Not Lant
//GETTING ERROR
{
if (strServerName.IndexOf("PAC") <= 0) //Not Pac
{
Response.Write ("<font size=2 face=Arial color=Red>To
access RADWeb site, please use one of the following...");
Response.Write ("<br><br>");
Response.Write ("<A
href='http://pac.com'>https://pac.com</a>");
Response.Write ("<br><br> OR <br><br>");
Response.Write ("<A
href='http://lant.com'>https://lant.com</a>");
Response.Write ("</font>");
Response.End();
}
}
}
-------------------------
Not getting any error while I am running the code. But if I step through the
code, watch window - value field displays 'strServerName.IndexOf' does not
exists.
Even if value is hardcode, strServerName = 'LANT', same error.
Help in this matter is greatly appreciated.
Thanks,
- Reena