.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

Unlimited Categories and Sub Categories

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :ASP.Net
Dear All, I want to add unlimited categories and sub categories facility, But I couldn't solve it for last two days. Can any body help me in this regards, Issue:   1. DB  CategID,CategName,parentid Data:  CategID             CategName                  Parent ID   1                        Electronics                    0 (where 0 means it is main category)   2                        TV                              1 (Self Join whith the categ id Electronics)   3                         Panasonic                  2   4   &

View Complete Post

More Related Resource Links

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

Control Gallery: some categories are not expaning

In this page,I noticed that some categories are not expanding.

How do I create Sub-Categories under Categories in a Blog Site

Hello, Looking for help using a blog site I need to create sub-categories under Categories that are located  in the Quick Launch area and also be able to add to sub-categories when needed, plus click the sub-category and it will open the post under that sub-category. I hope that I am making sense.  Thank you so much, JAM

Sharepoint Blog Site, adding sub-categories

Hello, Looking for help using a blog site I need to create sub-categories under Categories that are located  in the Quick Launch area and also be able to add to sub-categories when needed, plus click the sub-category and it will open the post under that sub-category. I hope that I am making sense.  Thank you so much, JAM

How do I add categories to Wiki pages?

I have sharepoint 2010 and I need to add categories to my wiki pages. The problem is that the category field is greyed out and clicking the tags icon next to it does nothing (nothing opens, no error messages). I know this is looked after by the managed metadata and I have access to this and I can add/create/remove terms and groups. But for the life of me, I can't get the categories to open up and be usable. And I can't find any info on troubleshooting this. Can anyone help? I could be doing something stupid so forgive me if this is a dumb question.

Entities Data Models with multiple Categories using a membership table

(Using SQL Server 2008 and ASP.NET MVC2) I have a simple business table and a category table. I have a 3rd table to map business to category, a many-to-many relationship. the Map table contains a BusinessID and CategoryID. I'm lost as to how I can load the categories into my Business View Model using the entities model.Without incorporating categories, my code looks like this: var businessList = from b in entitiesDB.Businesses select new Models.BusinessViewModel { BusinessID = b.BusinessID, Name = b.Name } with Business View Model defined as: public class BusinessViewModel { [ScaffoldColumn(false)] public Guid BusinessID { get; set; } public string Name { get; set; } public List<Models.CategoryViewModel> Categories { get; set; } } but if i want to populate the Categories with the mapped categories, how would one do that?Thanks in advance for any help!

Returning Customer Count of all categories in each time period



Lets say I have the following Table:

CustomerNumber | Date | MovieCategory
1 |2010-01-01|A
1 |2010-02-01|A
1 |2010-03-01|A
1 |2010-04-01|A
1 |2010-05-01|A
1 |2010-06-01|D
1 |2010-07-01|A
2 |2010-01-01|A
2 |2010-02-01|A
2 |2010-03-01|D
2 |2010-04-01|D
2 |2010-05-01|D
2 |2010-06-01|C
2 |2010-07-01|C
3 |2010-01-01|B
3 |2010-02-01|B
3 |2010-03-01|B
3 |2010-04-01|C
3 |2010-05-01|C

What I want to do is count the number of customers for each movie type in each date. Now I started with the following simple query

Select Date, MovieCategory, Count(CustomerNumber)
From AboveTable
Group By Date, MovieCategory
Order by Date, MovieCategory

which would be okay, but if no customer has a MovieCategory of say 'B' on a particular date then the results of the above query won't return a row that has

Date| B| 0     (date here could be any date).


which is really what I need. Is there a good way to

Need to show all categories


I need for my select statement to return all categories in the tblLookupCateg table even if a client had no points for the category for the month. Here is what I have, can anyone help me modify to show all categories, but zero if null points for any of them?

SELECT     tblLookupCateg.Category, Sum(tblPoints.Points) AS TotalPoints, MONTH(tblpoints.[pDate]) Month
FROM         stblpoints left outer JOIN
                      tblLookupCateg ON stblpoints.CategID = tblLookupCateg.CategID
WHERE     (YEAR(tblpoints.[pDate]) = 2010) AND (MONTH(tblpoints.[pDate]) = 8) AND (tblPoints.IndivID=14)
GROUP BY tblLookupCateg.Category,tblpoints.[pDate]

Category TotalPoints Month
PlanA    0    8
PlanB    3    8
PlanC    0    8
PlanD    5    8

Privacy categories user profile properties



I would like to delete some privacy categories, used to display the user profile properties.

Default options are : only me, my manager, my team, my colleagues and everyone.
I only wish to display "only me" and "everyone".

How can I accomplish this?


Organize pages in categories



I am setting up a site for news. On the first page I have added a CQWP to display all the news-articles (pages).

I want to make some kind of dropdown functionality or something, that when you create a new page you have to select which category you are putting the article in. What is the best solution for this?

I tried this;

I created a new column with a choice in the site settings and implemented this code to the pagelayout.

<SharePointWebControls:DropDownChoiceField FieldName="Category" runat="server" />


This didn't work apparently.. 

Problem seeing all Web Part Categories When Adding a Web Part

I have a development page that a one of my users is currently working on.  When he tries to add a web part to the page, the only web part category that he can see is the "Lists and Libraries" category.  When I go in, I see every category.  I have set him as an owner of the site, but that still has not given him access to see the other web parts.  I am convinced that this is a permissions issue, but I don't know what permission set he seems to be missing.  Anyone have any ideas?

Categories the Aggregations


I have a cube with one of the dimension as Category(IN, OUT), the measures are sum, avg and distinct products of that category.

The question is: How I can fix / make default and lock the category dimension whenever the cube is browsed by any tool.

The problem is that:

If user exclude the category dimension in the browser window the summation will be of both the categories (IN & OUT), but I always want the output to be divided as category. In other words how can I lock the category dimension as the default selection and always display the mesures in category as below: 

IN Summation Value, Avg Value, Distinct Value

Out Summation Value, Avg Value, Distinct Value

CQWP - AdditionalFilterFields - Wiki Categories field not working


Hello All,

So, after about 2 hours of putzing with this thing and digging up information about internal names and whatnot, I have gotten my ContentQueryWebPart to display "Wiki Categories" in its list of "Additional Filters."  If you know anything about that field, it is a Managed Metadata field that can have multiple selections per content item.  I have tried setting this value for one or more of the available options, but when I try to save the web part I get an error:

"You must specify a value for filters on managed metadata fields"

You can see how I would be confused, since... well... I *DID* "specify a value" for that filter.

Is there some other piece of the puzzle that I am missing?

Here is the property I added to the CQWP so far: (I added the line breaks and extra tabs for forum readability)

	<property name="AdditionalFilterFields" type="MultiChoice">
		Wiki_x0020_Page_x0020_Categories,Wiki Categories


Thanks in advance,


- Matt

How to changes sites and categories in Site Directory


I just tried to create my first Site Directory on a test site collection.  It looks like it comes up with some default categories upon creation: Division, Region, Top Tasks.  I am trying to edit this.  I first click on Edit Page then I try clicking on the Edit Sites and Categores link in the Categores web part.  However, the system seems to hand and then I get this pop up error message:

 Are you sure you want to navigate away from this page?
The page took too long to save.  Press OK to continue, or Cancel to say on the current page.

Why would I get that error, and how do I edit what appears in the web part (since it bears NO resemblance to my site collection at all)?

How come it doesn't automatically build a site map based on what is actually in the collection?

There are no mistakes; every result tells you something of value about what your are trying to accomplish.

This query does not work, it returns more than 5 Categories

The following query, is supposed to return only the 'top 5' categories of sales, based on sales amt. However, it is returning much more than 5. Perhaps someone can see what the problem is?

/****** Object: StoredProcedure [dbo].[_USP_QuoteMonth_Top5_only5] Script Date: 11/03/2010 17:12:08 ******/
/* --------------------------------------------------------------------------------------------------------*/
ALTER PROCEDURE [dbo].[_USP_QuoteMonth_Top5]
@FromDate VARCHAR(25),
@ToDate VARCHAR(25),
@CUSTNAME varchar(250),
@Department varchar(4000),
@Category varchar(4000),
@SalesTypes Varchar(50),
@Debug bit = 0
EXEC [_USP_QuoteMonth_Top5_only5] '01/01/2009', '01/31/2009', 'Northern Manor Multicare center', 'ALL' , 'ALL', '1'
EXEC [_USP_QuoteMonth_Top5_only5] '01/04/2009', '01/08/2009', 'Northern Manor Multicare center', 'ALL' , 'ALL', '1', @Debug = 1

EXEC [_USP_QuoteMonth_Top5_only5] '01/01/2009', '12/31/2009', 'Northern Manor Multicare center', 'ALL' , 'ALL', '1'
EXEC [_USP_QuoteMonth_Top5_only5] '01/01/2009', '12/31/2009', 'Northern Ma

Which clustering method is used in the clustering algorithm for Detect Categories table analysis too


I know that Detect Categories (part of Table Analysis tools) uses the Microsoft_Clustering algorithm in order to compare the similarity of rows in a data set and then categorize them. For the actual Cluster function in the Data Mining tab, you can customize the parameters of the clustering algorithm. This includes the parameter CLUSTERING_METHOD which specifies the clustering method for the Microsoft_Clustering algorithm to use. You can choose from the following clustering methods:

  • 1- Scalable EM
  • 2- Non-Scalable EM
  • 3- Scalable K-Means
  • 4- Non-Scalable K-Means

and 1-Scalable EM is the default method for the Clustering part of Data Mining.

When running the table analysis tool Detect Categories you do not have a way to adjust the parameters of the Microsoft_Clustering algorithm, including which clustering method to use.

So my question is what clustering method does Detect Categories use? I assumed it was the default for the Cluster, 1- Scalable EM, but I ran the same data set in Data Mining Clustering using the method 1-Scalable EM, and the cluster analysis gave me 6 clusters. I ran the same data set in the Detect Categories tool and it outputted 9 categories, not 6. So this is leading me to believe that the default parameters for the Microsoft_Clustering algorithm for the cluster tool

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