Solved - "Are You Missing An Assembly Reference Error in Visual Studio"

These days i am working on speech recognization feature of c# in visual studio , for this i must have to include ---

System.Speech 

namespace in my application...
and the problem arises here , when i include this namespace in my application - it gives me an error something like this-- 

"The type or namespace name 'Speech' does not exist in the namespace 'System' (are you missing an assembly reference?)"

First i thought that i am using older version of .net thats why i am seeing this error bcoz the Speech library is included in .net3.0 and later but actually i am using .net4.0, now that feel me odd ...... that i am using updated framework then why i am getting this error.....
Then i came with a solution that i have to add dll reference of this library ,then only i can include the specified namespace in my application, so to add reference , follow these steps:-

1. Go to Solution Explorer Window.
2. Right Click References.
3. Click on Add Reference.
4. Select .Net tab.
5. Then search for your specified Namespace, in my case it is System.Speech, so select that namespace.
6. Now Click Ok.

and you are done, you will not see that error now........

Enjoyzzz.... :-p



Binding Property Of Control From Other Control Using XAML in WPF

Hello, today i am going to tell you how to bind "Content" property of label to the textbox "Text" property.........
hmmmmm, i know that you are thinking what new in this , this can be achieved using simple coding but in this post i am going to tell you how can you achieve this using XAML(a strong part of wpf) , this is a new way of  binding , so plz take a look at this post.....
Well , lets do it with an example....... what we do is that we enter some text in textbox and at the same time the content of the label changes.. to achieve this use this part of code to set in content property of label in xaml window :-

<Label Name="lbl1" Content="{Binding ElementName=textbox1, Path=Text}"></Label>

here, ElementName tells -- to which control should the label control bind and the Path tells -- to which property it is binded

Hope, you all enjoy this and understood the motive of posting this post...... :-p



Check DropDown List contains a value in Asp.net ????

I am quite sure, that u all wondering that what a foolish type of post is this bcoz i know that atmost all of you can do this, but i am sure the way to do this provided by me is surely effective then the way that you all have used.....I have seen many people write good coding, but, sometimes they don't pick efficient way to do somethings. When we do code reviews we can identify some code parts are very simple to implement but they implement it in a complex way, want to correct them. A simple scenario is, how to check a drop down contains a value. Some people are looping through all items and finding the item exists or not. Some people are doing some complex logic etc. But, below is what  believe the good and simple way of finding a value is in drop down list of items :--------


  1. if (dropdownlist1.Items.FindByValue("someValue") != null)    
  2. {    
  3.    dropdownlist1.SelectedValue = "someValue";    



How to place cursor at the end and begining of the text in textbox??????


Welll these days , i am working on a small project and i am actually using textbox.focus() method to make focus on textbox, it is all going well, but the problem is -- it is selecting whole text also, then what i do , i use textbox.deselectall() method to deselect the text, but now again a new problem arises ,it is placing the cursor at the beginning of textbox, and i want to place the cursor at the end of the text, so i come with a very small and interesting code to place cursor at the end of the text in the textbox.... Here is the Code:---


textBox1.Select(textBox1.Text.Length, 0);


Similary,if you want to place cursor at the beginning of the text in textbox, then use this code :---


textBox1.Select(0,0);



How To Get Facebook Profile ID

Well today in this tutorial i am going to tell you , how to get your
profile ID of facebook , well i know your first question is why do i know my user profile Id, well for normal users it is not necessary to know your profile id , but ofcourse today facebook has launched many social plugins , so as to make these plugins work on your sites it is necessary to know your profile Id...........
Its very simple just go to


http://graph.facebook.com/USERNAME

Replace “USERNAME” with your Facebook user/profile name.
For example :- http://graph.facebook.com/nk.armaani
will gave the result

"id": "100002096660106",
"name": "Nk Armaani",
"first_name": "Nk",
"last_name": "Armaani",
"link": "http://www.facebook.com/nk.armaani"
"username": "nk.armaani",
"gender": "male",
"locale": "en_US",

Cheerrrzzzz........ Guyzzzz!!!!!!



Total Pageviews