public ActionResult About() { ContentAction objContent = new ContentAction(); Content aboutContent = objContent.GetContentByType("AboutUs"); ViewData["AboutContent"] = aboutContent != null ? aboutContent.Value1 : "Page is under construction, please visit again"; return View(); }
public ActionResult Contact() { ContentAction objContent = new ContentAction(); Content contactContent = objContent.GetContentByType("Contact"); ViewData["ContactContent"] = contactContent != null ? contactContent.Value1 : "Page is under construction, please visit again"; return View(); }
public void GetContent() { ContentAction objContent = new ContentAction(); Content mngContent = objContent.GetContentByType("AboutUs"); if (mngContent != null) ViewData["AboutUs"] = mngContent.Value1; mngContent = objContent.GetContentByType("News"); if (mngContent != null) ViewData["News"] = mngContent.Value1; mngContent = objContent.GetContentByType("Contact"); if (mngContent != null) ViewData["Contact"] = mngContent.Value1; IList<Content> mngFAQ = objContent.GetFAQ(); if (mngFAQ != null) ViewData["FAQs"] = mngFAQ; }
public ActionResult Contact(string Name, string Phone, string Email, string Address, string Company, string Comments) { #region //send automated email - content of email will be decided later // Creating array list for token ArrayList arrTokens = new ArrayList(); arrTokens.Add(Name); if (!string.IsNullOrEmpty(Phone)) arrTokens.Add(Phone); else arrTokens.Add("Not Applicable"); arrTokens.Add(Email); arrTokens.Add(Address); if (!string.IsNullOrEmpty(Company)) arrTokens.Add(Company); else arrTokens.Add("Not Applicable"); arrTokens.Add(Comments); // Filling mail object SendMail objSendMail = new SendMail(); objSendMail.ToEmailId = System.Configuration.ConfigurationManager.AppSettings["AdminMail"].ToString(); objSendMail.Subject = "email.contactUs.subject.content"; objSendMail.MsgBody = "email.contactUs.body.content"; objSendMail.ChangesInMessage = arrTokens; objSendMail.SendEmail(objSendMail); ViewData["ContactInfo"] = "Thank you for sharing your contact information"; ContentAction objContent = new ContentAction(); Content contactContent = objContent.GetContentByType("Contact"); ViewData["ContactContent"] = contactContent != null ? contactContent.Value1 : "Page is under construction, please visit again"; return View(); #endregion }
public ActionResult News() { ContentAction objContent = new ContentAction(); Content newsContent = objContent.GetContentByType("News"); ViewData["NewsContent"] = newsContent != null ? newsContent.Value1 : "Page is under construction, please visit again"; return View(); }