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

Top 5 Contributors of the Month
Post New Web Links

Trouble assigning properties for multiple CSS classes

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :ASP.Net
Hi Can anyone tell me why the first block of CSS below works, but the second one doesn't? Thanks Block 1: (works) <style type="text/css">  .FB  {      margin-bottom: 0.5in;      margin-left: 0.5in;      text-align: left;      float: left  }  .FB  {      color: Black;  }</style> Block 2: (Doesn't work - all I get for FB is color: Black)<style type="text/css">  .SomeOtherClass, FB  {      margin-bottom: 0.5in;      margin-left: 0.5in;      text-align: left;      float: left  }  .FB  {      color: Black;  }</style>

View Complete Post

More Related Resource Links

IEditableObject on classes with collection properties?

I have a question about the IEditableObject interface. In general it makes great sense. But what happens if you have complex classes that have nested objects or collections properties? What level of property changes are you supposed to be able to cancel?For discussion, let's say you have an "Order" class with a "Name" property and a "OrderLineItems" property that's a collection of "OrderLineItem". Each "OrderLineItem" has a "Quantity", "Description", and "Amount" property. Both classes implement IEditableObject.It's straightforward that if you call Order.BeginEdit, change Order.Name, and call Order.CancelEdit, then Order.Name will have it's original value. This is the normal case and why IEditableObject exists.But what if you call Order.BeginEdit, remove Order.OrderLineItems[0], and call Order.CancelEdit? Should the removed OrderLineItem be restored to the collection?What if you modify Order.OrderLineItems[0].Quantity? Should Order.CancelEdit restore that value? Perhaps Order.BeginEdit() should be calling BeginEdit() on each of it's children?I guess I'm wondering just how deep IEditableObject is expected to go? The MSDN documentation doesn't cover any of this. Any thoughts?SBussinger

LINQ to SQL Classes (dbml file) across multiple websites issue



I have a single LINQ to SQL Classes (dbml file) compiled in a Class Library that's referenced by 3 websites. Inside that Class Library there's also a class that's using the DBML to manipulate data.

At one point it needs to save in a user table the user info (firstname, lastname, email). SOMEHOW (!?) two of the 3 webapps saves email instead of firstname and viceversa while the other 1 saves them correctly ! The one compiled last seems to be the one saving correctly.

There's no code error as I have debugged this multiple times. The values are assigned correctly but before the SubmitChanges() call the data inside the database object is corrupted.

Now, I have already fixed this locally by putting every website in a separate AppPool (which also needs to be set to "Classic" and not "Integrated". However I really don't want to bug the client with such IIS changes so I'm looking for another workaround !

Please Help!



SPSWC:ProfilePropertyValue and multiple values user properties


Hi, I'm trying to customize the profile.aspx page in My Profile (SP 2010). All works fine except for the fact that I can't see the values of the user properties configured as multiple-value fields.

I'm using spswc:ProfilePropertyValue and what I get is a list of value separator (comma or semicolon, as configured in the user property) without values.

Do you know how to display multiple value user properties?

Thank you

Trouble showing class properties


I'm sorry in advance if my explanation isn't very clear. It's a bit hard to put to words what I'm trying to accomplish. That said here we go...

Does anybody know how to show class properties after instantiating the class in code? I have a class Employee and when I type a '.' after the employee object I see a list of properties and functions. The problem comes when I select a property that itself has additional properties.

Employee x = new Employee();

//when i type the '.' after the object "x" I see a list that has "ID," "Department," and "ListOfItems."

x.ID = 10;
x.Department = "Sales"

//I should see a list of properties when i type '.' after the property "ListOfItems" and I do not.

If I enter a valid property of the "ListOfItems" collection class it will let me view the value, but I'd like to see the list none the less.

Any help would be greatly appreciated. Thanks in advance!

Public properties of collection derived classes are not deserialized in REST wcf service


I have Restful wcf service that returns the following class, but the Total and Count fields become 0 when it reaches the client side. But they have the correct values on the server side.

 public class Groups : List<Group>
private int total;
private int start;

/// <summary>
/// Total number of Groups in the result set irrespective of the paging
/// </summary>

Trouble linking multiple tables in a sql query within a sqldatasource


I am trying to link 3 tables within a sqldata source.  when I debug/run the code I recieve an error stateing that I am missing an operator.

My code:

<asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
        SelectCommand="SELECT [ProductCode], [Title], [TechID], [Description], [DateOpened], [DateClosed]
            FROM [Incidents] INNER JOIN [Technicians]
                ON [Incidents.TechID] EQUALS [Technicians.TechID]
            INNER JOIN [Products]
                ON [Incidents.ProductCode] EQUALS [Products.ProductCode]
            WHERE ([CustomerID] = @CustomerID)
            ORDER BY [ProductCode]">

reusable classes for multiple server instances


Hi All:
I have a requirement to create a Reusable Database Class which supports multiple server instances of a replicated databse.  The pool of databases should be managed in a config file or wherever you think is best and the class should simply rotate through the list of servers. Also, A Resuable Error Handling class which is used by the database class. 
Please note that this a web application so all errors need to be raised back up to the caller and eventually redirect to a page which displays the error number and error message.  The error class should also support custom error numbers and descriptions which are managed internally in the .net app in a config file.

Parsing C# Classes, Methods, and Method Properties Using Regex's


I have a web project that allows multiple developers to contribute to a .cs file in the App_Code folder. I need to dynamically report on which classes exist in the file, which methods are in those classes, which properties are expected by those methods, and what the method returns. I can't seem to get my curly brace matching to work using regex's.

I went down the road of trying to dynamically build the code and then use reflection to enumerate the objects, but I don't think that's going to work.

Any help would be appreciated.

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Here is the code for binding the multiple drop down boxes in GridView using JQuery in ASP.NET

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

WCF Tip: Using Properties in Service Contracts

you'll notice all of the Service Contracts are implemented with interfaces containing only methods. For the longest time I thought that's all that was supported, until I thought about it a little more. In C# land, properties are simply wrappers around a get method and set method, so why wouldn't we be able to use properties in a service contract? Well the answer is we can.

Learning C# and OOP, Classes

This is the second lesson in a miniseries designed to teach you how to write object-oriented programs using C#. This miniseries will describe and discuss the necessary and significant aspects of object-oriented programming (OOP) using C#.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

GridView Multiple Filter AJAX Control

This AJAX control enables the user to filter data within any column inside a GridView. The user can add multiple filters and can delete existing ones too.

Automatic vs Explicit Properties

If the reason that motivated the change from automatically implemented property to explicitly implemented property was to change the semantics of the property then you should evaluate whether the desired semantics when accessing the property from within the class are identical to or different from the desired semantics when accessing the property from outside the class.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.
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