GIF89;a GIF89;a using System; using System.Data; using System.Collections; using System.Collections.Generic; using System.Configuration; 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; using BusinessLayer.Controllers; using BusinessLayer.Entities; using BusinessLayer.BOObjects; using Globals; public partial class Controls_Menusidebar : BaseControl { protected void Page_Load(object sender, EventArgs e) { Label1.Text = Resources.Common.MainPage_Text4; Label3.Text = Resources.Common.MainPage_Text6; List categories = new List(); BusinessLayer.Controllers.ControllerMainPage controller = new ControllerMainPage(); categories = controller.GetCategories(); foreach (Category c in categories) { HyperLink h1 = new HyperLink (); h1.Text = c.CategoryName ; h1.NavigateUrl = c.Link; h1.Attributes.Add ("onmouseover", "this.id='active'"); h1.Attributes.Add( "onmouseout" , "this.id=''" ); this.Div1.Controls.Add (h1); } Label4.Text = controller.GetText(); } protected void btSave_Click(object sender, EventArgs e) { BusinessLayer.Controllers.ControllerLid controller = new ControllerLid(); BusinessLayer.Entities.UserData user = new BusinessLayer.Entities.UserData(); user.FullName = this.txtName.Text; user.Telephone = this.txtPhone.Text; user.Mobile = this.txMobile.Text; user.Email = this.txEMail.Text; BusinessLayer.Entities.Lid ld = new BusinessLayer.Entities.Lid(); ld.User = user; if (GetPageParameter("CurrentPageId") != "") ld.CurrentPageId = Convert.ToInt32(GetPageParameter("CurrentPageId")); ld.Message = this.txMessage.Text; controller.SaveLid(ld); txtName.Text = ""; txtPhone.Text = ""; txMobile.Text = ""; txEMail.Text = ""; txMessage.Text = ""; } }