Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4
This is the forum to discuss the Wrox book Beginning Microsoft Visual C# 2008 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780470191354
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old March 2nd, 2010, 01:48 PM
Authorized User
Join Date: Apr 2009
Location: Sardinia - Italy
Posts: 48
Thanks: 16
Thanked 0 Times in 0 Posts
Default visibility of globally declared private static datatable

Hi there,

In the code behind I have declared a datatable, directly under the public partial class that inherits from my basePage that in its turn inherits from the page class.
private static DataTable photoSlides = new DataTable();
in the page load this datatable is loaded from a datareader, and that works fine.
However at the bottom of the cs page (after the page load) I have declared a pageMethod that is called by the slideShowextender from the ajax toolkit, that should give it its slides from the dataTable. However by the time the PageMethod needs to consume the dataTable object it has lost its value.
I have tried to run this page without its masterpage with its own scriptmanager, but without result.
A gridview in the pageload, that uses the datatable as its datasource perfectly displays the right data, but as soon as the page load event is over it seems that the datatable looses its data.

Can anybody help me with this issue?

best regards, Robin

nevermind! in the end it was not an issue of the variable being visible. I found out that the SlideSHowExtender does not accept a picture url in the format "~/pictures/etcetc.jpg" it then starts looking for picture files in the location "currentFolder/~/pictures/etcetc.jpg".
Strangely enough the tilde sign is not interpreted the way it should be and so no pictures appear in the slideshow.

thanks, Robin

Last edited by robbaralla; March 9th, 2010 at 10:18 AM. Reason: problem solved

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Static variables in Static Class JoinTTT BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 4 March 29th, 2009 05:08 PM
non-static reports to static html files miamikk ASP.NET 2.0 Basics 0 June 4th, 2007 01:48 PM
Visibility Issue braheem ASP.NET 1.0 and 1.1 Basics 1 July 14th, 2005 05:20 PM
event handlers declared as private or public ACE2084 ASP.NET 1.0 and 1.1 Basics 3 January 24th, 2005 11:28 AM
Procedure visibility rgerald Access VBA 6 December 10th, 2003 04:03 PM

All times are GMT -4. The time now is 01:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.