.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Don't Understand Why I Get: "The class or CssClass value is not defined."

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
I have a user control with this control in it:  <asp:Panel ID="panelTasks" runat="server" CssClass="taskList">In my styles.css file I have this definition:div.taskList{  height:59px;  margin:0 0 0 0;   padding:2px 0 0 0;  border:groove 2px #c2c2c2;  background-image: url(../Images/Gradients/gradientroyalblue.jpg);}I don't understand why I'm getting the warning message I am.  Any ideas?Robert

View Complete Post

More Related Resource Links

Memory Models: Understand the Impact of Low-Lock Techniques in Multithreaded Apps


Because the use of low-lock techniques in your application significantly increases the likelihood of introducing hard-to-find bugs, it is best to use them only when absolutely necessary. Here Vance Morrison demonstrates the limitations and subtleties low-lock techniques so that if you are forced to use them you have a better chance of using them correctly.

Vance Morrison

MSDN Magazine October 2005

Virus Hunting: Understand Common Virus Attacks Before They Strike to Better Protect Your Apps


Developer's machines can often be more vulnerable to viruses than the average corporate user because of their more frequent access to remote machines and shares, and the differing administrative privileges they maintain across mutiple machines. Reliance on antivirus software is fine as a first line of defense, but you need a basic arsenal of skills for securing the executables on your system and coping with viruses on your own. This article reviews proactive methods you can use to defend yourself against malicious executable code in resources, component libraries, scripts and macros, as well as how to avoid a handful of other potential vulnerabilities.

Jason Fisher

MSDN Magazine May 2003

Help me understand...

Ok, I'm getting a null reference exception whenever I try to databind this datatable to the Gridview. I know for sure that the datatable has data. I've checked it.GridView dg = new GridView(); dg.ID = "dg"; DataTable dattbl = Core.Transreports(Request.QueryString["itemaddress"], Request.QueryString["docnum"], Request.QueryString["docid"]); dg.AllowPaging = true; dg.PageSize = 10; dg.AutoGenerateColumns = true; dg.DataSource = dattbl; dg.DataBind();I get the error when it gets to the last line here... please help me. I'm at a loss for whats going on here.

really dont understand security on Sharepoint

Security issue using Sharepoint designer. I think this is more administration than Sharepoint designer. Have created a site where designers will update pages,CSS,Master pages. I have put these users in the Designers sharepoint group. I have branded the site initially and now passed this to the designers. The issue I have is the designers cant checkout and ammend master pages or css's even though the description of the group says this.They come up 'ACCESS DENIED' 'Members of this group can edit lists, document libraries, and pages in the site. Designers can create Master Pages and Page Layouts in the Master Page Gallery and can change the behavior and appearance of each site in the site collection by using master pages and CSS files. ' I have also tried to put the users on the site owners group but have 'ACCESS DENIED' and no luck. However if I make them a secondary administrators from site setting it works fine. I need to know the correct planning of roles in Sharepoint and what groups . The designers will ammend pages,page layouts,ammend master pages. Thanks

Magic - Can someone help me understand the dynamicquerystringparameter.

How did the dynamicquerystring parameter solve the problem below. It works but I don't understand why?   Situation: Two tables   table resource contains personal entries and has a primary key attribute "id"   table projects contains a primary key attribute "id" and a foreign key attribute "ResourceID" that is constrained to an id attribute from table resource.   I wanted to create a details view for the resource table that displayed in a gridview all of the projects to which a given resource was assigned. I used the details.aspx template as a starting point and added linq2sql and gridview controls. The linq2sql control was a select all from table projects and became the datasource for the gridview. I registered the gridview with the dynamicdatamanger and changed the databoundfields to dynamicdatafields.                    The problem Of course the gridview displayed all entries from table projects and as I didn't have vs2010 I didn't have the dynamicqueryextender. I was about to give up when I playing around added the dynamicquerystring parameter to my linq2sql datasource just for grins. All of a sudden the gridview automagically started filtering down to only the entries that had a ResourceID that was equal to the ID of the c

Don't Understand Checkpoint / Buffer Cache Explanation in BOL

Checkpoints and the Active Portion of the Log     ? Checkpoints flush dirty data pages from the buffer cache of the current database to disk. This minimizes the active portion of the log that must be processed during a full recovery of a database. During a full recovery, the following types of actions are performed: The log records of modifications not flushed to disk before the system stopped are rolled forward. All modifications associated with incomplete transactions, such as transactions for which there is no COMMIT or ROLLBACK log record, are rolled back.   I don't understand this BOL page... From what I read in the first sentence above, the following must be true: I understand that SQL Server apparently doesn't save updated data directly to disk but stores it in RAM (the so-called Buffer Cache) until either this RAM buffer is full or until a checkpoint operation is executed.   If this is tue, Isn't this quite dangerous? What happens if the server is powered off? Are all updates that had been stored in the Buffer Cache / Log Cache lost? After a server restart, how can "The log records of modifications not flushed to disk before the system stopped" possibly be "rolled forward" if they had been stored in the Buffer Cache? After a server restart the Buffer Cache and the Log Cache must be empty! So there are no unsaved l

how to understand full recovery model can restore to the point of failure


if I backup log hourly, 50 minutes after last log backup, sql server corrupts, I guess I can only restore to the last tlog backup, how to understand restore to the point of failure?

also if I use simple recovery model, backup differentially every hour, do I have the same data protection? I know answer is no, but how to understand it?



Understand sharepoint search result



i'm playing around with this code: http://weblogs.asp.net/jan/archive/2009/07/02/sharepoint-search-as-you-type-with-jquery.aspx

But i'm having a problem, with the result from sharepoint.

The result tells me, that there is (let's say) 76 hits.

But I have tried to find all 76 persons, and I only get 67.

Where is the last 9 persons ?

I hope this makes sense.

Jakob Olsen

An intermittent error I don't understand.


I'm new to ASP.net and using C# for the language. I wrote an application to track item moving from one location to another. Everything works fine in test and about half of the time in production but Occasionally I get an exception that I can't figure out. Any help would be great. When the user logs in I check for their access level I have stored in a Sybase database. The default page login code behind page has this code:

checkUserAccessLevel newUser = new checkUserAccessLevel();

               int currentUserAccessLevel = 0;

               currentUserAccessLevel = newUser.GetAccess();

The error message has the third line with the error plus a line in the class code file I am using.

Exception message: Object reference not set to an instance of an object.


Here is the class file located in the App_Code directory:

using System;

using System.Data;

using System.Configuration;

using Sybase.Data.AseClient;


public class checkUserAccessLevel


        string _svAppMode = (string)System.Web.HttpContext.Current.Session["_svAppMode"].ToString();

Trying to understand the logic of modalPopup Extender



I've read about the Modal Popup in AJAX toolkit and watched the video but still have some questions. In order to learn how it works, I wanted to do a simple example where I have a label control and a modal pop up within an UpdatePanel. The idea is to let the user click a LinkButton to call the modal pop up so that he/she can enter some text into a TextBox. I then take what the user entered and stuff it into my Label control. Simple enough! The part that I'm not clear about is the purpose of JavaScript placed on the ASP.NET pages i.e. all the examples I looked at had some type of JavaScript code on the ASP.NET page. In my example I don't have this JavaScript code which may be the reason why my code is not working.  I'd appreciate it if someone could tell me how things are supposed to work in order to get this code to work properly.

The part that I'm not getting is that the LinkButton invokes the modal popup because we tell it to in the Modal Popup Extender. From there, the code behind should work and because everything is happening in an UpdatePanel, my label control should get updated without a page refresh. What am I missing here? 

Here's my code:

Here's the ASP.NET page code:


<head runat=

Trying to understand Array being reference types


Below I'm pasting a simple application to roll 5 die 10 times and display each roll on screen.  the problem I'm having is that the output will look like this


3  4  6  3  1
3  4  6  3  1
3  4  6  3  1

but when i step through I different values for each roll

Here's the code


namespace DiceRoller
    class DiceManager
        private int numOfDice;
        private int[] diceRoll;

        public DiceManager(int numOfDice)
            NumOfDice = numOfDice;

        public int NumOfDice
            get { return numOfDice; }
            set { numOfDice = value; }

        public int[] DiceRoll
            get { return diceRoll; }
        // Roll dice and sets the diceRoll Array to values between 1 and 6.
        private void RollDice()
            diceRoll = new int[NumOfDice];
            Random rand = new Random();
            for (int i = 0; i < diceRoll.Length; i++)
                diceRoll[i] = rand.Next(1, 6);

        public void DisplayResults()
            foreach( int dieValue in diceRoll )
                Console.Write("{0}\t", dieValue);

Trying to fulling understand P-Invoke for performance and best practices.


Hi, I'm looking to see if I'm approaching this subject correctly and how I can speed up performance/production.

I'm using a program that allows plug-ins. The plug-in is initialized through a Startup function we define in our plug-in dll. This startup function takes in an Interface* that can be used to communicate back to the program. I want to use C# for all my programming but have a thin managed/unmanaged wrapper that allows me to interface with the program. There are 2 parts...

1) The Program communicates through the plugin from static exported function calls... For this I'm just using global events so in each callback I call a C# event function if the C# plugin registerd to the event.


static void GetPlugInInfo(PlugInInfo* info)


  if (GlobalEvents::GetPlugInInfo != nullptr)


    ManagedPlugInInfo info;

    GlobalEvents::GetPlugInInfo(nullptr, info);

    // copy ManagedPlugInInfo -> passed in plug in info by copying each member variable

   // is this the fatest way to do this, is there a way I can just do a memcpy if my struct i

Learn and Understand AngularJS

Master AngularJS and the Javascript concepts behind it, design custom directives, and build a single page application.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend