InstantASP Support

Help & Support

Adding a "We Use Cookies" notice to your InstantForum or InstantKB installation

Common Questios

In some countries it's a requirement to display a notice to end users to inform them that your InstantForum or InstantKB installation uses cookies. We've we don't have this functionality out the box (just yet) it's very simple to add this to either InstantForum or InstantKB in just 20 lines of code.

The Code


<div class="row cookie-notice">
<div class="padding">
This site uses cookies. <a href="#" class="btn-sml close"><span>Got It</span></a>


<script type="text/javascript">

$(document).ready(function () {

// name for cookie to track if we've accepted cookies
var ckName = "cookiesOK";

// get cookie to track if we've already accepted cookies
var ckVal = iasp_GetCookie(ckName);

// show cookie notice if we've not already accepted
if (!ckVal) {
var $notice = $(".cookie-notice");
$notice.find(".close").click(function () {
iasp_SetCookie(ckName, "1");




.cookie-notice { font: normal 10pt Arial; background:#F9FFDA; border-bottom: 1px solid #ccc; color:#222; position: fixed; z-index: 1; text-align: center; display: none; }
.cookie-notice .padding { display:inline-block; padding: 12px; }

Putting it all together

To make it super simple to implement the above code we've compiled a single user control attached below.

1. Download the attached ZIP file below.

2. Extract the ZIP file to your desktop. This will create a single folder called "CustomControls". Copy the CustomControls folder into the root of your InstantForum or InstantKB installation.

3. Add a reference to the user control from your InstantForum or InstantKB MasterPage. Your MasterPage file can be found within the root of your active skin folder (skins/classic by default) and is called MasterPage.Master.

Open MasterPage.Master in NotePad or similar text editor.

Add the following tag to the top of the MasterPage.Master below the exsting <%@ Register $> tags at the very top of the master page...

<%@ Register Src="~/CustomControls/CookieNotice.ascx" TagPrefix="uc1" TagName="CookieNotice" %>

Add the following highlighted tag just before the end </form> tag within your InstantForum or InstantKB master page...

<uc1:cookienotice runat="server" id="CookieNotice" />



How It Looks

The screen grab below shows the cookie use bar in action...

That's It!

You can of course customize the text displayed to end users. We've tried to keep this example very simple to show you simply how to achieve this functionality.Of course if we can assist with any customization questions please don't hesitate to contact us or open a support ticket.

Attachments 1.00 KB, 1.1K views

Optionally provide private feedback to help us improve this article...

Thank you for your feedback!

Comments require login or registration.


Product: InstantKB, InstantForum
Article not rated yet.
Article has been viewed 13K times.
Last Modified: 4 Years Ago
Last Modified By: Ryan Healey


Similar Articles