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

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

Reserved and Contextual Keywords

Posted By: Venkat     Posted Date: February 04, 2010    Points: 2   Category :.NET Framework
Many programming languages, C# included, treat certain sequences of letters as "special".

Some sequences are so special that they cannot be used as identifiers. Let's call those the "reserved keywords" and the remaining special sequences we'll call the "contextual keywords". They are "contextual" because the character sequence might one meaning in a context where the keyword is expected and another in a context where an identifier is expected.*

View Complete Post

More Related Resource Links

UnCommon C# keywords - A Look

This is really a weird topic to start with. But still I would like to give you an insight on some of the uncommon things that you may not have noticed while doing programming. I have framed them in 2 sections.

1st one for Undocumented Keywords, which you will not find anywhere, not even in MSDN Documentation, which are not listed to intellesense menu in visual studio.
2nd one for Documented Keywords which are uncommon or just being introduced to C#. Documented keywords which are uncommon can be found over MSDN.

What is the difference between "dynamic" and "object" keywords?

Let's take a quick look at the object keyword first. I'm not going to talk a lot about it because it's been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.

How to display a count of search results with keywords in a label?


Sorry for a basic post here; I am very new to VB!

I am currently building a search page, which includes a textbox and two drop-down lists, a search button, and a datagrid. If results are found and displayed, I would like a label to display:

(e.g.) "24 results found for 'blue sky clouds' "

...where the integer represents the results count, and the keywords and/or drop-down list selections are included in the string.

If no results are found I would like the label to display:

(e.g.) "No results were found that match your selection. Please try again"

I would also like the label to be invisible until a search occurs.

Thanks in advance!

IIS Smooth Streaming: Enhancing Silverlight Video Experiences with Contextual Data


Adaptive streaming addresses the problem of smooth content delivery and decoding. We walk you through the basics of IIS Smooth Streaming and demonstrate how you can manipulate audio, video and caption data in your own Silverlight projects.

Jit Ghosh

MSDN Magazine March 2010

search multiple words into textbox and populate all records in gridview related those keywords


I have a textbox and a gridview which is bound to a table

what I want to achieve is a solution where lets say there are two records - e.g. "1. Book and 2. Red", i want a user to type in those words and the gridview shows the results as followed;

1. Book

2. Red

I have set up the sql data source and everything and my like operator is this...

LIKE '%' + @record + '%'

how can I solve this problem?

Permissions for Search Keywords and Best Bets

Do you know if it is possible for a user, which is not a Site Collection Administrator, to access "Site Settings / Search Keywords" admin page?Maybe by creating a new Permission Level or......   The reason for this, is that I have editors which I do not want to upgrade to Site Collection Admintrators, but they need to create Search Keywords and Best Bets.

Error occured while trying to add Keywords

All, The Farm is migrated from 2007 to 2010 When I add a keyword/best bet to the site, im getting the below error, and I think the file Keyword.aspx that Im accessing is a OOB one. No custom work in that page apart from a custom Masterpage, which works fine in all the other pages. But the keyword is added successfully ! Thanks in advance :)     Trying to use an SPWeb object that has been closed or disposed and is no longer valid. Trying to use an SPWeb object that has been closed or disposed and is no longer valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Microsoft.SharePoint.SPException: Trying to use an SPWeb object that has been closed or disposed and is no longer valid. Source Error: [No relevant source lines] Source File: c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\6ac7b2b2\bd184dc\App_Web_listkeywords.aspx.2a428413.eey9ytvu.0.cs    Line: 0 Stack Trace: [SPException: Trying to use an SPWeb object that has been closed or disposed and is no longer valid.] Microsoft.Office.Server.Search.Internal.UI.SearchAdminPageBase.ErrorHandler(Object sender, EventArgs e) +275 System.Web.UI.TemplateControl.OnError(EventArgs e) +1103

Can SharePoint 2010 Tag Cloud webPart show managed keywords tags only from Document Library

Can SharePoint 2010 Tag Cloud webPart show managed keywords tags only from a specified Document Library ? Also can i add multiple document libraries tagged for a single tag cloud webpart?

which webpart activated my contextual tab


I've build (pasted together) a contextual ribbon for a webpart of mine. All webpart commands will be client side javascript. This means you don't need any difficult and confusing custom page components. (everything is jquery webservice and client object model) implementing IWebPartPageComponentProviderwebpart gives me a contextual ribbon for the selected webpart. The ribbon is declared a in xml file below which is much more maintainable than a string in a webpart class.

What I don't know yet is how to have my javascript functions know which webpart is selected. The xml will only call one set of javascript function and that is not a problem as these function are the same for all webparts. But it would be nice if when users click add, items are added to the active webpart. I will research this on my own, but if anyone out there knows the answer, please let me know.

public WebPartContextualInfo WebPartContextualInfo
        WebPartContextualInfo info = new 

Putting multiple keywords remove best bets


If I add a search keyword lets say test , and define it to show up when the user types test then it works fine.  However for the search term if I type something like test another_word then the best bet does not show up.  I would expect the  test to still show up as a match.  From observation it seems like the best bet only works you type one word into the search box if you type more than one word then it does not work, is this correct?

If this is the case then I have the following problem.  In my search the user always excludes a specific word in the search so a typical search text would be searchword -excludeword .  The problem is that since the user is excluding a word (two words have been typed in) the best bet for searchword does not show up.  Does anyone have any solution to this?


Need advice on how to use reserved word in a class



I'm making an API call to a third party service -- sending data using JSON. I have a class that I convert to JSON using System.Web.Script.Serialization namespace. The problem I'm having is this: the API I'm calling is expecting data/value pair for "public". They use this for setting security for an object i.e. public: 1 makes it readable by everyone. I think you now see the problem. I can't set the name of the property in my class to public because it has a meaning in .Net framework. But the API I'm calling is expecting a property called public.

How do I get around this?

How to make highlighted keywords clickable in WPF



I am using WPF application and I am using Text Block to show some news and the contents of the news I am storing in a list and comparing with other list. Common keywords from both the list I am storing in one list and highlighting it on the Text block where I am showing news. Till this I have done.

Now I want to make the highlighted keywords clickable and clicking on which I should send those keywords in the Text Box.

Can anyone help me in this.


Mohammad Farhan Khan

How to return matching keywords from sharepoint search web service


I'm writing an ISV page that is embedded in an iFrame within Microsoft Dynamics CRM 4.0 and it searchs both CRM and Sharepoint for matching candidates. Skills are stored in CRM entities and then Sharepoint Document libraries are searched for matching keywords in document resumes. I then merge the results together. However in the results I would like to show which skills (in crm) and keywords (in sharepoint) matched.

I have been playing arround with the Sharepoint Search Service Tool trying to find a way. The closest I can get is the Managed Search Property "Hit Highlighted Summary", but that won't gurantee every matching keyword to be returned when 5+ keywords are searched. I could search each keyword invidually and post process but that is very inefficient.

Is there a way to accomplish what i'm trying to do? (meta data about the search results about matching keywords?)

Thanks in advance,



SharePoint keywords and synonyms


How SharePoint keywords and synonyms work?

Is it mandatory to set the Best bets?

When I set a keyword as ‘home’ and synonyms as flat; apartment; house.

The search is not working properly.

 In search if I type flat and search its fetching the results for home, but if I use apartment or house it’s not working properly(only first word from synonyms is working fine).

After I set the synonyms, I did a full crawl also.

Is there any documentation how this keyword and synonyms work?


Reserved.ReportViewerWebControl.axd and ASP.Net session expired


Hello and thanks for the forums!


I have a web site targeting framework 3.5 that uses web reports and a couple of them are causing me some headaches.  While I see on the forums and various places on the web different discussions regarding some of the same things I see in the errors, I don't really find anything that fits specifically what is occuring.  My users can eventually run the reports, but it takes 2 or 3 attempts before they do run.  I have been unable to duplicate the problem in development.  Everything I've read thus far says that there is a web.config handler missing but mine are in there.  But some of what I see being added as the handler is not necessarily what I have in mine and I'm curious if there might be a problem with how I have them entered.  I do have several other reports that never generate an error, so I'm at a loss as to what could be causing the problem.


First, the reportviewer dll's are in the bin folder.  My web.config has the following handler sections:

   <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

enterprise keywords vs managed metadata


Can someone please explain what the differences are between enterprise keywords and managed metadata?





In Microsoft Access, the SQL syntax of your query may say "Select Distinct" or "Select DistinctRow". Are you familiar with the difference? Learn how this impacts which records and number of records you see, and whether they can be edited.
Unique Values and Unique Records Properties

When creating a query in Microsoft Access, you might want to return only distinct or unique values. There are two options in the query's property sheet, "Unique Values" and "Unique Records":
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