This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Data.Linq; | |
using System.Text; | |
using NUnit.Framework; | |
using Sandow.LuxeSource.Models; | |
namespace Sandow.LuxeSource.Tests | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Application_BeginRequest(Object sender, EventArgs e) | |
{ | |
// Check url | |
if (Regex.IsMatch(HttpContext.Current.Request.Url.ToString(), @"[A-Z]") == true) | |
{ | |
// Lowercase url | |
String lower = HttpContext.Current.Request.Url.ToString().ToLower(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
divRollup.InnerHtml = "<strong>Using Employee.Manager(s)</strong><br /><br />"; | |
if (emp.Manager != null) | |
{ | |
divRollup.InnerHtml += "1 - " + emp.Manager.EmployeeFullName + "<br />"; | |
if (emp.Manager.Superior != null) | |
{ | |
divRollup.InnerHtml += "2 - " + emp.Manager.Superior.FullName + "<br />"; | |
if (emp.Manager.Superior.Superior != null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string RenderViewToString(ControllerContext context, string viewName, object model) | |
{ | |
if (string.IsNullOrEmpty(viewName)) | |
viewName = context.RouteData.GetRequiredString("action"); | |
ViewDataDictionary viewData = new ViewDataDictionary(model); | |
using (StringWriter sw = new StringWriter()) | |
{ | |
ViewEngineResult viewResult = ViewEngines.Engines.FindPartialView(context, viewName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var g = 'Galileo'; | |
for (i = 0; i < 5; i++){ | |
if (i % 2 == 0) { console.log(g.toUpperCase()); } | |
else { console.log(g.toLowerCase()); } | |
if (i == 4) { console.log("Figaro!"); } | |
}; | |
console.log('Magnifico!'); |