Skip to content

Instantly share code, notes, and snippets.

Mattias Petter Johansson mpj

Block or report user

Report or block mpj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
We couldn’t find that file to show.
View MECS-resizer.js
// This sets the bounding box of the
// resize function. If the image is bigger or smaller than this,
// it's forced to this size.
var boxWidth = 500;
var boxHeight = 370;
var jcrop;
var defaultSelection;
function initializeJCrop() {
View GolfWeather2009 Example
<script type="text/javascript" src=""></script>
<script type="text/javascript">
// Required: weather_golf_club_id
// The GIT id of the golf club that you want weather for.
// The golf club must have the weather module enabled.
var weather_golf_club_id = "1285a58f-cae3-4654-84cf-4f687febef3d";
// Optional: Custom Images
// Any url can be inserted here.
View LDA embedding code
<div id="LDAContainer" style="width: 100%; position: absolute; top: 0px; left: 0px; z-index: 10000;">
<div class="fillScreenNoJavaScript" style="width:100%;height:5000px;position:fixed;top:0px;left:0px;background-color:#ffffff;z-index:10005;text-align:center;color:gray;"><span style="width:400px;margin:100px auto 0px auto;font-size:20px;">You need Javascript enabled in your web browser to view this site.</span></div>
<div class="fillScreen"></div>
<div id="LDAPlaceHolder"></div>
<script type="text/javascript">
var ldaServerPath = "";
var ldaBaseUrl = "lda/imheremovie/en";
View cs
using System;
using System.Collections;
using System.Web;
using EPiServer;
using EPiServer.Core;
namespace AbsolutCom
public partial class Navigation : Absolut.EPiServer.UI.PageBase
View aspx
<%@ Page Language="C#" Inherits="AbsolutCom.Navigation" CodeFile="AbsolutCom_Navigation.aspx.cs" %>
//<%= Request.QueryString.ToString() %>
function navFindSource(e)
return ? : e.srcElement;
function navAddListener(obj, eventName, callback)
View overrida page med detta
protected override void SavePageStateToPersistenceMedium(object viewState)
if (Page.ToString() == "ASP.default_aspx")
string str = "VIEWSTATE_" + Request.UserHostAddress + "_" + DateTime.Now.Ticks.ToString();
Session[str] = viewState; // session works in web garden
//Cache.Add(str, viewState, null, DateTime.Now.AddMinutes(Session.Timeout), TimeSpan.Zero,
//CacheItemPriority.Default, null);
ClientScript.RegisterHiddenField("__VIEWSTATE_KEY", str);
View bajs
<object width="384" height="216" type="application/x-shockwave-flash" id="ESPN_VIDEO" data="" allowscriptaccess="always" allownetworking="all"><param name="movie" value="" /><param name="allowFullScreen" value="true" /><param name="wmode" value="opaque" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="flashVars" value="id=4982905" /></object>
View SetControlText
delegate void SetTextCallback(Control ctrl, string value);
void SetControlText(Control ctrl, string value)
// InvokeRequired required compares the thread ID of the
// calling thread to the thread ID of the creating thread.
// If these threads are different, it returns true.
if (ctrl.InvokeRequired)
SetTextCallback d = new SetTextCallback(SetControlText);
this.Invoke(d, new object[] { ctrl, value });
You can’t perform that action at this time.