Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 11th, 2011, 09:26 AM
Registered User
 
Join Date: Jun 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default nullreferenceexception was unhandled by user code

we are using this session in the menus, if the user has admin rights some menus are shown otherwise not shown. here is the code
<tr><td>
<%if (System.Web.HttpContext.Current.Session["admin"].ToString() == "Y")
{ %>
<li style="width:124px;"><a href="#" style="text-decoration:none;">Add Location</a>
<%}
else if (System.Web.HttpContext.Current.Session["admin"].ToString() == "N")
{ %>
<li style="width:124px;"><a href="#" style="text-decoration:none;"> Location </a>
<%} %>
</td></tr>

And we use the session time out as 540. but why this error message shown .. Thanks in Advance




Similar Threads
Thread Thread Starter Forum Replies Last Post
System.NullReferenceException was unhandled by user code - Chapter 8 dtmmaxx BOOK: Beginning ASP.NET 4 : in C# and VB 10 September 1st, 2011 05:51 PM
ConstraintException was unhandled by user code jcooper0 BOOK: Professional ASP.NET MVC 2 8 February 16th, 2011 09:32 AM
Problem need help(!!!) ConstraintException was unhandled bt user code west BOOK: Professional ASP.NET MVC 2 3 October 26th, 2010 01:52 PM
HttpCompileException was unhandled by user code. error CS0246 fh84 BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 4 October 25th, 2010 12:49 PM
TargetInvocationException was unhandled by user code MattHoff BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 2 October 13th, 2010 11:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.