Skip to content

Instantly share code, notes, and snippets.

View justsayantan's full-sized avatar
💭
I may be slow to respond.

justsayantan

💭
I may be slow to respond.
View GitHub Profile
public static class CookieHelper
{
public static void SetCookieValue(string productType, int cookieExpireDay)
{
CookieHelper.SetCookie(productType,cookieExpireDay);
}
private static void SetCookie(string modalityType, int cookieExpireDay)
{
HttpCookie testCookie = HttpContext.Current.Request.Cookies["Modality"] ?? new HttpCookie("Modality");
using Tridion.ContentDelivery.AmbientData;
namespace Sdl.Web.Site.Helper.HttpModules
{
public class AmbientDataFrameworkCustomHttpModule : IHttpModule
{
void IHttpModule.Dispose() { }
void IHttpModule.Init(HttpApplication context)
@justsayantan
justsayantan / CacheController.java
Created December 11, 2015 06:21
CacheController in Tridion DD4T 2.0
/**
* Use this controller to manually invalidate the DD4T and its dependency cache.
* Please note: this controller for developers.
*/
@Controller
public class CacheController {
private final Logger LOG = LoggerFactory.getLogger(getClass());
private final ApplicationContext applicationContext;
@justsayantan
justsayantan / Admin.aspx
Last active February 24, 2016 18:19
Get User List and Group List for Tridion
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">