System.Collections.Generic.List1[Dynamicweb.Rendering.RazorTemplateBase
1+LoopItem[System.Object]]
Name | Public? | Return |
---|---|---|
get_Capacity() | True | System.Int32 |
set_Capacity(System.Int32 value) | True | System.Void |
get_Count() | True | System.Int32 |
{ | |
"version": 1, | |
"chromeVersion": 44, | |
"generated": "2015-08-28T07:38:43.470Z", | |
"features": [{ | |
"id": "ignore-gpu-blacklist", | |
"platform": ["Mac", "Windows", "Linux", "Chrome OS", "Android"], | |
"name": "Tilsidesæt liste over gengivelse af software" | |
}, { | |
"id": "enable-experimental-canvas-features", |
@{ | |
// Check if cart exists | |
var cart = "Empty"; | |
if (System.Web.HttpContext.Current.Session["eComCart"]!="") | |
{ | |
Dynamicweb.eCommerce.Orders.Order order = (Dynamicweb.eCommerce.Orders.Order) System.Web.HttpContext.Current.Session["eComCart"]; | |
// Format like this: 1.299,95 | |
cart = String.Format("{0:0,0.00}", order.TotalPrice); | |
} | |
} |
<%@ Page Language="cs" AutoEventWireup="false" %> | |
<% | |
/* SHO 01/02/2014 10.21: Returns a JSON object containing JSON object with info of Cart TotalPrice formated as 2.999,95 | |
If no cart exists it contains -1 | |
It also has a soloution based counter which can be used to get a unique number. | |
It sets cache information in header to avoid client side caching of response. | |
Place it in /Admin/Public/ or use it in Razor | |
*/ | |
// Clear any previous reponse, importend in Razor scenaries |
if (typeof window.console==='undefined') window.console = {'ver':'Fri Feb 07 2014 16:44:36 GMT+0100 (CET)','debug':function(){},'error':function(){},'info':function(){},'log':function(){},'warn':function(){},'dir':function(){},'dirxml':function(){},'table':function(){},'trace':function(){},'assert':function(){},'count':function(){},'markTimeline':function(){},'profile':function(){},'profileEnd':function(){},'time':function(){},'timeEnd':function(){},'timeStamp':function(){},'timeline':function(){},'timelineEnd':function(){},'group':function(){},'groupCollapsed':function(){},'groupEnd':function(){},'clear':function(){}} |
System.Collections.Generic.List1[Dynamicweb.Rendering.RazorTemplateBase
1+LoopItem[System.Object]]
Name | Public? | Return |
---|---|---|
get_Capacity() | True | System.Int32 |
set_Capacity(System.Int32 value) | True | System.Void |
get_Count() | True | System.Int32 |
var json; | |
function toJSON(selector) { | |
var elements = document.querySelectorAll(selector+' [name]'); | |
var obj = {}; | |
for(var ele=0;ele<elements.length;ele++) { | |
var t = elements[ele]; | |
obj[t.name] = t.value; | |
} | |
prompt("form "+selector+"", JSON.stringify(obj)) | |
}; |
// https://gist.github.com/9207088 | |
function sameHeight(settings) { | |
var defaults = { | |
"selector": "", | |
"ignoreZero": true, | |
// If minHeight <= 0 and ignoreZero==true, no action taken | |
"minHeight": -1 | |
}; | |
var usedSettings = $.extend(defaults, settings); |
AngularJS has a module which handles requests using AJAX. In this pen I request data from a Dynamicweb CMS based website.
A Pen by Sten Hougaard on CodePen.
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.css"> | |
<link rel="stylesheet" href="style.css"> | |
<title>Bootstrap/angularjs</title> | |
</head> |
// Code snippet for request missing PID - say coming from Google search | |
@using System.Web | |
@using Dynamicweb.Frontend; | |
var request = HttpContext.Current.Request; | |
var response = HttpContext.Current.Response; | |
var pidFromRequest = Dynamicweb.Base.ChkString(request["pid"]); | |
var pageviewURL = GetGlobalValue("Global:Pageview.Url"); | |
if (pidFromRequest=="") { |