using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace infoExpediters.Controls { public partial class header : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { tdIndex.Attributes.Add("style", "background: url(Images/bg.gif)"); tdAddcompany.Attributes.Add("style", "background: url(Images/bg.gif)"); tdContactus.Attributes.Add("style", "background: url(Images/bg.gif)"); tdBlog.Attributes.Add("style", "background: url(Images/bg.gif)"); tdAboutus.Attributes.Add("style", "background: url(Images/bg.gif)"); tdMDWorksheet.Attributes.Add("style", "background: url(Images/bg.gif)"); lnkIndex.CssClass = "bodyText"; lnkAddCompany.CssClass = "bodyText"; lnkBlog.CssClass = "bodyText"; lnkAboutus.CssClass = "bodyText"; lnkContactus.CssClass = "bodyText"; lnkMDWorksheet.CssClass = "bodyText"; if (Request.CurrentExecutionFilePath == "/Default.aspx" || Request.CurrentExecutionFilePath == "/viewcompanydetails.aspx" || Request.CurrentExecutionFilePath == "/searchresults.aspx") { tdIndex.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkIndex.CssClass = "bodyTextwhite"; } else if (Request.CurrentExecutionFilePath == "/addyourcompany.aspx") { tdAddcompany.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkAddCompany.CssClass = "bodyTextwhite"; } else if (Request.CurrentExecutionFilePath == "/contactus.aspx") { tdContactus.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkContactus.CssClass = "bodyTextwhite"; } else if (Request.CurrentExecutionFilePath == "/industryblog.aspx") { tdBlog.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkBlog.CssClass = "bodyTextwhite"; } else if (Request.CurrentExecutionFilePath == "/aboutus.aspx") { tdAboutus.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkAboutus.CssClass = "bodyTextwhite"; } else if (Request.CurrentExecutionFilePath == "/Worksheet.aspx") { tdMDWorksheet.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkMDWorksheet.CssClass = "bodyTextwhite"; } else { tdIndex.Attributes.Add("style", "background: url(Images/bg1.gif)"); lnkIndex.CssClass = "bodyTextwhite"; } } } } }