Saturday, July 31, 2010
  Search
 
Register
Login
 
How To Customize the Privacy and Terms Links on Your DotNetNuke Portal
Straight out of the box, DotNetNuke already has a lot of things covered. But, what do you do when you are ready to begin customizing your site. Sometimes, it’s not so easy to figure out how to make t...

Find this article and more in the DotNetNuke category

Read This Article . . .

How to Utilize AjaxToolKit with DotNetNuke Portals
Integrating the AjaxToolkit into DotNetNuke modules is super easy. But, can be frustrating if you're not sure how. Find out how to Ajax enable your modules in less than 5 minutes now!   The ...

Find this article and more in the Module Development category

Read This Article . . .

Using DNN to take Advantage of GoDaddy Domain Names
Let's face it, GoDaddy is cheap. Pay for the hosting services and the domain names are $1.99, not a bad deal. And even without hosting services, you can pick up domain names for as low as $6.99. Put ...

Find this article and more in the category

Read This Article . . .

Getting Aquainted with the DNN Classes
 So, you've decided to start checking out DotNetNuke development and you're wondering where to start, right? Well, it's easy to start taking a quick tour of the DotNetNuke classes now with the help o...

Find this article and more in the category

Read This Article . . .

Creating new DotNetNuke HTTP Alias Records
 Setting up DotNetNuke to handle serving requests for Portal Alias records is a breeze. You can use these records to direct your site to handle requests for multiple domain names to one website with ...

Find this article and more in the category

Read This Article . . .

How to Install DotNetNuke 5.0 Cambrian and Video
 This video tutorial covers installing using the Custom installation option, with SQL Express and also an external SQL Database. Find out more about which package to download and how to kick off the ...

Find this article and more in the category

Read This Article . . .

Quick Check for Troubleshooting the CodeEndeavor Ajax Templates
I haven’t just installed the the template and created a module out of the box yet. However, I have come across a few things that I know to check and fix and I’m up and running in no time at all. If y...

Find this article and more in the category

Read This Article . . .

Generate a Module Data Access Layer With CodeSmith
With the introduction of some of the newer DNN tools, building a custom module is becoming more and more easy. With the right tools, you can have a custom module built in no time flat. This will outl...

Find this article and more in the DotNetNuke category

Read This Article . . .

Creating a Virtual Directory in IIS
One of the first things you will need to do prior to installing DotNetNuke on a server is to create a virtual directory which will host your DotNetNuke website.  If you have full control over you...

Find this article and more in the IIS & ASP.NET category

Read This Article . . .

DotNetNuke 5 Cambrian Extropy Skin Features and Limitations
The new DotNetNuke Extropy skin looks very cool from a distance...leaps and bounds above the old default blue skin. But, it's got some limitations you should know about upfront.

Find this article and more in the category

Read This Article . . .

Search for Articles

Virtual-Essential's DotNetNuke, .NET, and SQL Tips For the Developer

Minimize
Nov 11

Written by: Briana Tarrance
11/11/2008 7:03 PM 

While surfing the web, I found the most useful little snippet of code that can help quickly troubleshoot and track down session and application variables. Just throw the code on an .aspx page and view in browser while you have your application running. A little F5 here and there and you can easily keep up with what's going on with your session and application level variables.

   Just throw this code on an aspx page and you're good to go...

Session Variables - <% =Session.Contents.Count %> Found<br><br>
<%
Dim item, itemloop
For Each item in Session.Contents
  If IsArray(Session(item)) then
    For itemloop = LBound(Session(item)) to UBound(Session(item))
%>
<% =item %>  <% =itemloop %> <font color=blue><% =Session(item)(itemloop) %></font><BR>
<%
    Next
  Else
%>
<% =item %> <font color=blue><% =Session.Contents(item) %></font><BR>
<%
  End If
Next
%>
 
<hr>
 
Application Variables - <% =Application.Contents.Count %> Found<br><br>
<%
For Each item in Application.Contents
  If IsArray(Application(item)) then
    For itemloop = LBound(Application(item)) to UBound(Application(item))
%>
<% =item %>   <% =itemloop %> <font color=blue><% =Application(item)(itemloop) %></font><BR>
<%
    Next
  Else
%>
<% =item %> <font color=blue><% =Application.Contents(item) %></font><BR>
<%
  End If
Next
%>
</font>

Then, you can quickly clear them by using the following:

<%
Session.Abandon
Application.Contents.RemoveAll()
%>

This Code Snippet was originally found at: <http://www.powerasp.net/content/new/displaying-session-and-application-variables.asp>

   

   

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
 
 
Copyright 2008 by Virtual-Essentials.com Privacy Statement    Terms Of Use