This file contains hidden or 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
/* IE 6 */ | |
* html .yourclass { } | |
/* IE 7 */ | |
*+html .yourclass{ } | |
/* IE 7 and modern browsers */ | |
html>body .yourclass { } | |
/* Modern browsers (not IE 7) */ |
This file contains hidden or 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 linkRewriter = function(old_domain, new_domain) { | |
$('a[href*="' + old_domain + '"]').each(function() { | |
if ($(this).attr('href') == old_domain ) { | |
$(this).attr('href', $(this).attr('href').replace(old_domain, new_domain)); | |
} | |
}); | |
}; | |
linkRewriter('www.olddomain.com', 'www.newdomain.com'); |
This file contains hidden or 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 GetAltTextFromImage(string path) | |
{ | |
string result = string.Empty; | |
if (!string.IsNullOrEmpty(path)) | |
{ | |
// Get start position for image name from path | |
int first = path.LastIndexOf("/") + 1; | |
// Get last position for image name from path |
This file contains hidden or 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
// <summary> | |
/// An abstract base Http Handler for all your | |
/// <see cref="IHttpHandler"/> needs. | |
/// </summary> | |
/// <remarks> | |
/// <p> | |
/// For the most part, classes that inherit from this | |
/// class do not need to override <see cref="ProcessRequest"/>. | |
/// Instead implement the abstract methods and | |
/// properties and put the main business logic |
This file contains hidden or 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 class MyHandler : IHttpHandler | |
{ | |
private const string CONSTSOMEPARAM = "SomeParam"; | |
public MyHandler(){} | |
public void ProcessRequest(HttpContext context) | |
{ | |
// Don't allow this response to be cached by the browser. | |
// Note, you MIGHT want to allow it to be cached, depending on what you're doing. |
This file contains hidden or 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
protected void Application_Error(object sender, EventArgs e) | |
{ | |
//Application.Lock(); | |
//Application["LastException"] = Server.GetLastError(); | |
var serverError = Server.GetLastError() as HttpException; | |
if (serverError != null) | |
{ | |
int errorCode = serverError.GetHttpCode(); |
This file contains hidden or 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
$('iframe').each(function() { | |
var source = $(this).attr('src'); | |
var wmode = "wmode=opaque"; | |
if (source.indexOf('?') != -1) { | |
$(this).attr('src', source + '&' + wmode); | |
} else { | |
$(this).attr('src', source + '?' + wmode); | |
} | |
}); |
This file contains hidden or 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
@model UmbracoLogin.MemberLoginModel | |
@if (User.Identity.IsAuthenticated) | |
{ | |
<p>Logged in: @User.Identity.Name</p> | |
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p> | |
} | |
else | |
{ | |
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface")) | |
{ |
NewerOlder