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
$(document).ready(function () { | |
// clear all the inputs on the form on the modal id documentModal | |
$('#documentModal').on('hidden.bs.modal', function (e) { | |
$('input[type=radio]').prop('checked', false); | |
$('input[type=checkbox]').prop('checked', false); | |
$(this) | |
.find("input,textarea,select") | |
.val('') | |
.end() | |
}); |
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
<html lang="en-US" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script> | |
$( document ).ready(function() { | |
console.log( "ready!" ); | |
var isMobile = window.matchMedia("only screen and (max-width: 760px)"); | |
console.log("isMobile : " + isMobile.matches ); | |
var px; | |
var py; |
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 touchDevice = (navigator.maxTouchPoints || 'ontouchstart' in document.documentElement); | |
var isMobile = { | |
Android: function () { | |
return navigator.userAgent.match(/Android/i); | |
}, | |
BlackBerry: function () { | |
return navigator.userAgent.match(/BlackBerry/i); | |
}, | |
iOS: function () { |
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
[RegularExpression("([1-9][0-9]*)", ErrorMessage = "Enter only numeric number")] | |
public int Amount { get; set; } |
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
static class ObjectHelper | |
{ | |
public static void Dump<T>(this T x) | |
{ | |
string json = Newtonsoft.Json.JsonConvert.SerializeObject(x, Formatting.Indented); | |
Console.WriteLine(json); | |
} | |
} |
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 class StringExtensions | |
{ | |
public static string Repeat(this string instr, int n) | |
{ | |
var result = string.Empty; | |
for (var i = 0; i < n; i++) | |
result += instr; | |
return result; |
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
I needed a cross-browser solution. Requirements were: | |
needed to work on both iOS and elsewhere | |
don't have access to the content in the iFrame | |
need it to scroll! | |
Building off what I learned from @Idra regarding scrolling="no" on iOS and this post about fitting iFrame content to the screen in iOS here's what I ended up with. Hope it helps someone =) | |
HTML | |
<div id="url-wrapper"></div> |
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
<!--Following are the changes that has to be done in web.config for Log4net debugging (if you think the problem with Log4Net logging module itself)--> | |
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration> | |
<appSettings> | |
<add key="log4net.Internal.Debug" value="true"/> | |
</appSettings> | |
</configuration> | |
And the following has to be added as well |
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
https://world.episerver.com/blogs/Alexander-Haneng/Dates/2012/7/How-to-define-properties-in-EPiServer-7---A-quick-reference/ |
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 iTextSharp.text; | |
using iTextSharp.text.html.simpleparser; | |
using iTextSharp.text.pdf; | |
using iTextSharp_PDF.Services; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Hosting; |
OlderNewer