This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Tuesday, June 4, 2013

How do I remove my personal details from Google search?


If you want to remove your personal details/data from google search results try use some of these tools:
1. Wizard Removing Content From Google
2. Keeping personal information out of Google.
3. User Webmaster Tools for remove data:

If you don’t already have one, then
1) Create a Google account (I am sure you might have one, if not create a gmail account)
2) Go to this URL: https://www.google.com/webmasters/tools/removals


3) Click on "Create a new removal request" button
4) Type in URL you would like to remove.
That's it you are done.

List of 221 MS Word Short Cut Keys

List of 221 MS Word Short Cut Keys

List of 221 MS Word Short Cut Keys

Short Cut Key
Word Command
Description

1
Ctrl + Shift + A
AllCaps
Makes the selection all capitals (toggle)

2
Alt + Ctrl + 1
ApplyHeading1
Applies Heading 1 style to the selected text

3
Alt + Ctrl + 2
ApplyHeading2
Applies Heading 2 style to the selected text

4
Alt + Ctrl + 3
ApplyHeading3
Applies Heading 3 style to the selected text

5
Ctrl + Shift + L
ApplyListBullet
Applies List Bullet style to the selected text

6
Alt + F10
AppMaximize
Enlarges the application window to full size

7
Alt + F5
AppRestore
Restores the application window to normal size

8
Ctrl+B
Bold
Makes the selection bold (toggle)

9
Ctrl + PgDn
BrowseNext
Jump to the next browse object

10
Ctrl + PgUp
BrowsePrev
Jump to the previous browse object

11
Alt + Ctrl + Home
BrowseSel
Select the next/prev browse object

12
Esc
Cancel
Terminates an action

13
Ctrl+E
CenterPara
Centers the paragraph between the indents

14
Shift+F3
ChangeCase
Changes the case of the letters in the selection

15
Left arrow
CharLeft
Moves the insertion point to the left one character

16
Shift + Left arrow
CharLeftExtend
Extends the selection to the left one character

17
Rt arrow
CharRight
Moves the insertion point to the right one character

18
Shift + Rt arrow
CharRightExtend
Extends the selection to the right one character

19
Alt + Shift + C
ClosePane
Closes the active window pane (if you are in Normal View and have,
for example, the Footnote pane open)

20
Alt+Drag (or press Ctrl + Shift + F8 and drag, but Alt + Drag is
far easier!)
ColumnSelect
Selects a columnar block of text

21
Ctrl +Shift+C
CopyFormat
Copies the formatting of the selection

22
Shift + F2
CopyText
Makes a copy of the selection without using the clipboard (press
Return to paste)

23
Alt + F3
CreateAutoText
Adds an AutoText entry to the active template

24
Ctrl+ Backspace
DeleteBackWord
Deletes the previous word without putting it on the Clipboard

25
Ctrl + Del
DeleteWord
Deletes the next word without putting it on the Clipboard

26
Ctrl+W, Ctrl+F4
DocClose
Prompts to save the document and then closes the active window.
(But doesn't intercept the menu command)

27
Ctrl + F10
DocMaximize
Enlarges the active window to full size

28
Ctrl + F7
DocMove
Changes the position of the active window

29
Ctrl + F5
DocRestore
Restores the window to normal size

30
Ctrl + F8
DocSize
Changes the size of the active window

31
Alt + Ctrl + S
DocSplit
Splits the active window horizontally and then adjusts the split

32
Alt + Shift + F9
DoFieldClick
Executes the action associated with macrobutton fields

33
Ctrl + Shift + D
DoubleUnderline
Double underlines the selection (toggle)

34
Alt R, G
DrawGroup
Groups the selected drawing objects

35
Alt R, I
DrawSnapToGrid
Sets up a grid for aligning drawing objects

36
Alt R, U
DrawUngroup
Ungroups the selected group of drawing objects

37
Ctrl+Shift+F5 (Or: Alt I, K)
EditBookmark
Brings up the bookmark dialog

38
Del
EditClear
Performs a forward delete or removes the selection without putting
it on the Clipboard

39
Ctrl+C
EditCopy
Copies the selection and puts it on the Clipboard

40
Ctrl+X
EditCut
Cuts the selection and puts it on the Clipboard

41
Ctrl+F
EditFind
Finds the specified text or the specified formatting

42
F5, Ctrl+G
EditGoTo
Jumps to a specified place in the active document

43
Alt E, K
EditLinks
Allows links to be viewed, updated, opened, or removed

44
Ctrl+V
EditPaste
Inserts the Clipboard contents at the insertion point

45
Alt E, S
EditPasteSpecial
Inserts the Clipboard contents as a linked object, embedded object,
or other format

46
Alt + Shift + Backspc
EditRedo
Redoes the last action that was undone

47
F4
EditRedoOrRepeat
Repeats the last command, or redoes the last action that was undone
(unfortunately, doesn't work for as many commands in Word 2000 as in Word 97 and
below, but this is still one of Word's most useful shortcuts, if not the most
useful)

48
Ctrl+H
EditReplace
Finds the specified text or the specified formatting and replaces
it

49
Ctrl+A
EditSelectAll
Selects the entire document

50
Ctrl+Z
EditUndo
Reverses the last action

51
Alt + PageDn (to select to end of column, use Alt + Shift + PgDn)
EndOfColumn
Moves to the last cell in the current table column

52
Ctrl+Shift+End
EndOfDocExtend
Extends the selection to the end of the last line of the document

53
Ctrl+End
EndOfDocument
Moves the insertion point to the end of the last line of the
document

54
End
EndOfLine
Moves the insertion point to the end of the current line

55
Shift+End
EndOfLineExtend
Extends the selection to the end of the current line

56
Alt+End
EndOfRow
Moves to the last cell in the current row

57
Alt + Ctrl + PgDn
EndOfWindow
Moves the insertion point to the end of the last visible line on
the screen

58
Shift + Alt + Ctrl + PgDn
EndOfWindowExtend
Extends the selection to the end of the last visible line on the
screen

59
F8 (press Esc to turn off)
ExtendSelection
Turns on extend selection mode and then expands the selection with
the direction keys

60
Alt + F4 (<9>)
FileCloseOrExit
Closes the current document, or if no documents are open, quits
Word. Horrible command, as it makes it a long winded business to quit Word. But
there's a simple solution - assign Alt+F4 to FileExit instead.

61
Alt + F4 (Word 97)
FileExit
Quits Microsoft Word and prompts to save the documents (does
intercept the menu item, but not the keyboard shortcut, or the x button. An
AutoExit macro is usually a better way of intercepting this).

62
NOT Ctrl+N!!
FileNew
Creates a new document or template (brings up the dialog). Note
that: Word pretends that Ctrl+N is assigned to FileNew but it isn't, it's
assigned to FileNewDefault You can fix this in Word 2000 by assigning Ctrl+N to
the FileNewDialog command. In Word 97 the only way to fix it is to create a
macro called FileNew (to do this, press Alt + F8, type "FileNew" without the
quotes and Click "Create". The macro will automatically contain the code needed
to make it work).

63
Ctrl+N
FileNewDefault
Creates a new document based on the Normal template.

64
Ctrl+O
FileOpen
Opens an existing document or template

65
Alt F, U
FilePageSetup
Changes the page setup of the selected sections

66
Ctrl + P
FilePrint
Prints the active document (brings up the dialog)

67
Ctrl+F2
FilePrintPreview
Displays full pages as they will be printed

68
Alt F, I
FileProperties
Shows the properties of the active document

69
Ctrl+S
FileSave
FileSave

70
Alt F, A (or F12)
FileSaveAs
Saves a copy of the document in a separate file (brings up the
dialog)

71
Ctrl+Shift+F
Font
Activates the Fonts listbox on the formatting toolbar

72
Ctrl+Shift+P
FontSizeSelect
Activates the Font Size drop-down on the formatting toolbar

73
Alt + Ctrl + K
FormatAutoFormat
Automatically formats a document (or sometimes, automatically
screws it up)

74
Alt O, B
FormatBordersAndShading
Changes the borders and shading of the selected paragraphs, table
cells, and pictures

75
Alt O, E
FormatChangeCase
Changes the case of the letters in the selection

76
Alt O, C
FormatColumns
Changes the column format of the selected sections (brings up the
dialog)

77
Alt O, D
FormatDropCap
Formats the first character of current paragraph as a dropped
capital (must select it first)

78
Ctrl+D
FormatFont
Brings up the Format + Font dialog

79
Alt + Shift + R
FormatHeaderFooterLink
Links the current header/footer to the previous section (but does
not intercept the button on the Header Footer toolbar)

80
Alt O, P
FormatParagraph
Brings up the Format Paragraph dialog

81
Alt O, S
FormatStyle
Applies, creates, or modifies styles

82
Alt O, T
FormatTabs
Brings up the Format Tabs dialog

83
Shift + F5
GoBack
Returns to the previous insertion point (goes back to up to 3
points, then returns to where you started; this is one of the most useful
shortcuts of them all. Also useful when opening a document, if you want to g
straight to where you were last editing it)

84
Ctrl + >
GrowFont
Increases the font size of the selection

85
Ctrl + ]
GrowFontOnePoint
Increases the font size of the selection by one point

86
Ctrl + T (or drag the ruler)
HangingIndent
Increases the hanging indent

87
F1
Help
Microsoft Word Help

88
Shift + F1
HelpTool
Lets you get help on a command or screen region or examine text
properties

89
Ctrl + Shift + H
Hidden
Makes the selection hidden text (toggle)

90
Click on it
HyperlinkOpen
Connect to a hyperlink's address

91
Ctrl + M (or drag the ruler)
Indent
Moves the left indent to the next tab stop

92
Alt + Ctrl + M (or Alt I, M)
InsertAnnotation
Inserts a comment

93
F3
InsertAutoText
Replaces the name of the AutoText entry with its contents

94
Alt I, B
InsertBreak
Ends a page, column, or section at the insertion point

95
Alt I, C
InsertCaption
Inserts a caption above or below a selected object

96
Ctrl + Shift + Return
InsertColumnBreak
Inserts a column break at the insertion point

97
Alt + Shift + D
InsertDateField
Inserts a date field

98
Alt + Ctrl + D
InsertEndnoteNow
Inserts an endnote reference at the insertion point without
displaying the dialog

99
Alt I, F
InsertField
Inserts a field in the active document

100
Ctrl+F9
InsertFieldChars
Inserts an empty field with the enclosing field characters

101
Alt I, L
InsertFile
Inserts the text of another file into the active document

102
Alt I, N
InsertFootnote
Inserts a footnote or endnote reference at the insertion point

103
Alt + Ctrl + F
InsertFootnoteNow
Inserts a footnote reference at the insertion point without
displaying the dialog

104
Ctrl + K
InsertHyperlink
Insert Hyperlink

105
Alt I, D
InsertIndexAndTables
Inserts an index or a table of contents, figures, or authorities
into the document

106
Alt + Ctrl + L
InsertListNumField
Inserts a ListNum Field

107
Alt + Shift + F
InsertMergeField
Brings up a dialog to insert a mail merge field at the insertion
point. (It does not intercept the button on the Mail merge. toolbar)

108
Ctrl + Return
InsertPageBreak
Inserts a page break at the insertion point

109
Alt + Shift + P
InsertPageField
Inserts a page number field

110
Ctrl + Shift + F3
InsertSpike
Empties the spike AutoText entry and inserts all of its contents
into the document

111
Alt + Shift + T
InsertTimeField
Inserts a time field

112
Ctrl + I
Italic
Makes the selection italic (toggle)

113
Ctrl + J
JustifyPara
Aligns the paragraph at both the left and the right indent

114
Ctrl + L
LeftPara
Aligns the paragraph at the left indent

115
Down arrow
LineDown
Moves the insertion point down one line

116
Shift + down arrow
LineDownExtend
Extends the selection down one line

117
Up arrow
LineUp
Moves the insertion point up one line

118
Shift + up arrow
LineUpExtend
Extends the selection up one line

119
Ctrl + F11
LockFields
Locks the selected fields to prevent updating

120
Alt + Shift + K
MailMergeCheck
Checks for errors in a mail merge

121
Alt+Shift+E
MailMergeEditDataSource
Lets you edit a mail merge data source

122
Alt + Shift + N
MailMergeToDoc
Collects the results of the mail merge in a document

123
Alt Shift + M
MailMergeToPrinter
Sends the results of the mail merge to the printer

124
Alt + Shift + I
MarkCitation
Marks the text you want to include in the table of authorities

125
Alt + Shift + X
MarkIndexEntry
Marks the text you want to include in the index

126
Alt + Shift + O
MarkTableOfContentsEntry
Inserts a TC field (but it is far better to use Heading Styles to
generate your Table of Contents instead)

127
Alt or F10
MenuMode
Makes the menu bar active

128
Alt + Shift + F11
MicrosoftScriptEditor
Starts or switches to Microsoft Development Environment
application, allowing you to view the HTML/XML source code that would be behind
the document if it were in .htm format (or that is behind it if it already is in
.htm format).

129
Alt + Ctrl + F1
MicrosoftSystemInfo
Execute the Microsoft System Info application

130
F2
MoveText
Moves the selection to a specified location without using the
clipboard (press Return to execute the more)

131
Tab
NextCell
Moves to the next table cell

132
F11
NextField
Moves to the next field

133
Alt + F7
NextMisspelling
Find next spelling error

134
Alt + down arrow
NextObject
Moves to the next object on the page

135
Ctrl + F6
NextWindow
Switches to the next document window, equivalent to selecting a
document from the Window menu.

136
Ctrl+Shift+N
NormalStyle
Applies the Normal style

137
Ctrl + 0
OpenOrCloseUpPara
Sets or removes extra spacing above the selected paragraph

138
F6
OtherPane
Switches to another window pane in Normal View (for instance, if
you have if you have a Footnotes pane open in Normal view and want to switch to
the main document and back without closing the pane).

139
Alt + _
OutlineCollapse
Collapses an Outline in Outline View by one level

140
Alt+Shift+rt arrow
OutlineDemote
Demotes the selected paragraphs one heading level

141
Alt + +
OutlineExpand
Expands an Outline in Outline View by one level

142
Alt+Shift+down arrow
OutlineMoveDown
Moves the selection below the next item in the outline

143
Alt+Shift+up arrow
OutlineMoveUp
Moves the selection above the previous item in the outline

144
Alt+Shift+left arrow
OutlinePromote
Promotes the selected paragraphs one heading level

145
Alt + Shift + L
OutlineShowFirstLine
Toggles between showing the first line of each paragraph only or
showing all of the body text in the outline

146
Ins
Overtype
Toggles the typing mode between replacing and inserting

147
PgDn
PageDown
Moves the insertion point and document display to the next screen
of text

148
Shift+ PgDn
PageDownExtend
Extends the selection and changes the document display to the next
screen of text

149
PgUp
PageUp
Moves the insertion point and document display to the previous
screen of text

150
Shift + PgUp
PageUpExtend
Extends the selection and changes the document display to the
previous screen of text

151
Ctrl + down arrow
ParaDown
Moves the insertion point to the beginning of the next paragraph

152
Shift + Ctrl + down arrow
ParaDownExtend
Extends the selection to the beginning of the next paragraph

153
Ctrl + up arrow
ParaUp
Moves the insertion point to the beginning of the previous
paragraph

154
Shift + Ctrl + up arrow
ParaUpExtend
Extends the selection to the beginning of the previous paragraph

155
Ctrl+Shift+V
PasteFormat
Applies the previously copied formatting to selection

156
Shift + Tab
PrevCell
Moves to the previous table cell

157
Shift + F11
PrevField
Moves to the previous field

158
Alt + up arrow
PrevObject
Moves to the previous object on the page

159
Ctrl + Shift + F6
PrevWindow
Switches back to the previous document window

160
Sfift+F4
RepeatFind
Repeats Go To or Find to find the next occurrence

161
Ctrl+Spacebar
ResetChar
Makes the selection the default character format of the applied
style

162
Ctrl+Q
ResetPara
Makes the selection the default paragraph format of the applied
style

163
Ctrl +R
RightPara
Aligns the paragraph at the right indent

164
Ctrl + *
ShowAll
Shows/hides all nonprinting characters

165
Alt + Shift + A
ShowAllHeadings
Displays all of the heading levels and the body text in Outline
View

166
Ctrl + <
ShrinkFont
Decreases the font size of the selection

167
Ctrl + [
ShrinkFontOnePoint
Decreases the font size of the selection by one point

168
Ctrl + Shift + K
SmallCaps
Makes the selection small capitals (toggle)

169
Ctrl + 1
SpacePara1
Sets the line spacing to single space

170
Ctrl + 5
SpacePara15
Sets the line spacing to one-and-one-half space

171
Ctrl + 2
SpacePara2
Sets the line spacing to double space

172
Ctrl + F3
Spike
Deletes the selection and adds it to the "Spike" AutoText entry
(which allows you to move text and graphics from nonadjacent locations)

173
Alt + PgUp
StartOfColumn
Moves to the first cell in the current column

174
Ctrl+Shift+Home
StartOfDocExtend
Extends the selection to the beginning of the first line of the
document

175
Ctrl +Home
StartOfDocument
Moves the insertion point to the beginning of the first line of the
document

176
Home
StartOfLine
Moves the insertion point to the beginning of the current line

177
Shift+Home
StartOfLineExtend
Extends the selection to the beginning of the current line

178
Alt+Home
StartOfRow
Moves to the first cell in the current row

179
Alt+Ctrl+PgUp
StartOfWindow
Moves the insertion point to the beginning of the first visible
line on the screen

180
Shift+ Alt+Ctrl+PgUp
StartOfWindowExtend
Extends the selection to the beginning of the first visible line on
the screen

181
Strl + Shift + S
Style
Activates the Style drop-down on the Formatting toolbar

182
Ctrl + =
Subscript
Makes the selection subscript (toggle)

183
Ctrl + +
Superscript
Makes the selection superscript (toggle)

184
Ctrl + Shift + Q
SymbolFont
Applies the Symbol font to the selection

185
Alt A, F
TableAutoFormat
Applies a set of formatting to a table

186
Alt A, H
TableHeadings
Toggles table headings attribute on and off

187
Alt + click
(Alt + drag to select several)
TableSelectColumn
Selects the current column in a table

188
Click in left margin
TableSelectRow
Selects the current row in a table

189
Alt + double-click
TableSelectTable
Selects an entire table

190
Alt + Ctrl + U
TableUpdateAutoFormat
Updates the table formatting to match the applied Table Autoformat
settings

191
Shift + F9 (Alt + F9 toggles all field codes on or off)
ToggleFieldDisplay
Shows the field codes or the results for the selection (toggle)

192
Alt T, C
ToolsCustomize
Allows you to customizes the Word user interface (menus, keyboard
and toolbars) and store the customizations in a template (defaults to
Normal.dot, so be careful!)

193
Alt + F8
ToolsMacro
Runs, creates, deletes, or revises a macro

194
F7
ToolsProofing
Checks the spelling and grammar in the active document

195
Ctr.l + Shift + E
ToolsRevisionMarksToggle
Toggles track changes for the active document

196
Shift + F7
ToolsThesaurus
Finds a synonym for the selected word

197
Ctrl+U
Underline
Formats the selection with a continuous underline (toggle)

198
Ctrl + Shift + T
(or drag the ruler)
UnHang
Decreases the hanging indent

199
Ctrl + Shift + M
(or drag the ruler)
UnIndent
Moves the left indent to the previous tab stop

200
Ctrl+Shift+F9
UnlinkFields
Permanently replaces the field codes with the results

201
Ctrl + Shift + F11
UnlockFields
Unlocks the selected fields for updating

202
F9
UpdateFields
Updates and displays the results of the selected fields

203
Ctrl + Shiift + F7
UpdateSource
Copies the modified text of a linked file back to its source file

204
Hover over comment
ViewAnnotations
Show or hide the comment pane

205
Dbl-click the endnote reference
ViewEndnoteArea
If in Normal View, opens a pane for viewing and editing the endnote
(toggle). If in Page/Print Layout View, switches from the body text to the
endnote or vice versa

206
At + F9
ViewFieldCodes
Shows the field codes or results for all fields (toggle)

207
Dbl-click the footnote reference
ViewFootnoteArea
If in Normal View, opens a pane for viewing and editing the
footnote (toggle). If in Page/Print Layout View, switches from the body text to
the footnote or vice versa.

208
Alt V, F
ViewFootnotes
If in Normal View, opens a pane for viewing and editing footnotes
and endnotes (toggle). If in Page/Print Layout View, switches from the body text
to the footnotes/endnotes or vice versa.

209
Alt V, H
ViewHeader
Displays header in page layout view

210
Alt V, N
(or Alt + Ctrl + N)
ViewNormal
Changes the editing view to normal view

211
Alt V, O
(or Alt + Ctrl + O)
ViewOutline
Displays a document's outline

212
Alt V, P
(or Alt + Ctrl + P)
ViewPage
Displays the page more-or-less as it will be printed, and allows
editing (In Word 2000 the menu item is called Print Layout, but fortunately the
command hasn't changed.

213
Alt + F11
ViewVBCode
Shows the VB editing environment (Tools + Macro + Visual Basic
Editor)

214
Alt + left arrow
WebGoBack
Backward hyperlink (useful if you clicked on a page number
hyperlink in the table of contents and then want to return to the TOC)

215
Alt + rt arrow
WebGoForward
Forward hyperlink

216
Alt W, A
WindowArrangeAll
Arranges windows as non-overlapping tiles

217
Ctrl + left arrow
WordLeft
Moves the insertion point to the left one word

218
Shift + Ctrl + left arrow
WordLeftExtend
Extends the selection to the left one word

219
Ctrl + rt arrow
WordRight
Moves the insertion point to the right one word

220
Shift + Ctrl + rt arrow
WordRightExtend
Extends the selection to the right one word

221
Ctrl + Shift + W
WordUnderline
Underlines the words but not the spaces in the selection (toggle)

Tweet Posting from Asp.net using OAuth - Twitterizer Tutorial


Twitter Tweet Posting from Asp.net Web Application using OAuth.

Main Steps
1) Create Twitter Application.
2) Post Tweet from Asp.net Website using Twitterizer Api

Now, lets understand each steps in more details, step by step.

Create Twitter Application
1) Open http://twitter.com/apps/new
2) Login to twitter and Fill the Application Information as follow.






















 - Choose Image for your Twitter Application.
 - Fill in Twitter Application Name.
 - Description of Twitter Application
 - Fill in Application Website name, Organization
























- Choose Application Type as "Browser" as we are developing asp.net website to post tweet.
- Callback Url is url where twitter would redirect after authentication.
    - Fill in rest of details as shown in figure and your Twitter Application is ready to use.























Now, lets begin the important part, how to post tweet.

Post Tweet from Asp.net Website using Twitterizer Api
1) Create Asp.net Application
2) Download Twitterizer
3) Add Reference of Twitterizer.dll files to newly created asp.net web application
4) Copy Consumer Key and Consumer Secret generated from Twitter Application.
5) Add Consumer Key and Consumer Secret to web.config file inside AppSettings

    <add key="consumerKey" value="XXXXXXXXXx"/>
    <add key="consumerSecret" value="XXXXXXXXXXXXXXXX"/>

6) In .aspx page arrange the controls as shown in figure.















7) Paste following code in "Authenticate User" Button Click event

protected void btnAuthenticate_Click(object sender, EventArgs e)
{
// add these to web.config or your preferred location
var consumerKey = ConfigurationManager.AppSettings["consumerKey"];
var consumerSecret = ConfigurationManager.AppSettings["consumerSecret"];

//If User is not valid user
if (Request.QueryString["oauth_token"] == null)
{
//Step 1: Get Request Token
OAuthTokenResponse RequestToken 
= OAuthUtility.GetRequestToken(consumerKey,                                                 consumerSecret);

//Step 2: Redirect User to Requested Token
Response.Redirect("http://twitter.com/oauth/authorize?oauth_token=" 
+ RequestToken.Token);
}
else
{
//For Valid User
string Oauth_Token = Request.QueryString["oauth_token"].ToString();
var accessToken = OAuthUtility.GetAccessToken(consumerKey,
consumerSecret,
Oauth_Token);

lblMessage.Text = "<b>Hello " 
+ accessToken.ScreenName 
+ ", Welcome to Go4Sharepoint.com Twitter App<b>";

lblMessage.Text += "<br/> Token: " + accessToken.Token;
lblMessage.Text += "<br/> TokenSecret: " + accessToken.TokenSecret;
lblMessage.Text += "<br/> UserId: " + accessToken.UserId;
}
}

8) Now run the application and try to click on "Authenticate User" button, it will redirect you to twitter website authenticate user and return back to your asp.net website.


















Click on Authenticate User button.













Press on Allow button after you enter your twitter login account details




















9) Create OAuthToken Object and Post Tweet.
protected void btnPostTweet_Click(object sender, EventArgs e)
{
// add these to web.config or your preferred location
var consumerKey = ConfigurationManager.AppSettings["consumerKey"];
var consumerSecret = ConfigurationManager.AppSettings["consumerSecret"];

OAuthTokens accessToken = new OAuthTokens();
accessToken.AccessToken = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx";
accessToken.AccessTokenSecret = "xxxxxxxxxxxxxxxxxxxx";
accessToken.ConsumerKey = consumerKey;
accessToken.ConsumerSecret = consumerSecret;

TwitterStatus TweetStatus = new TwitterStatus(accessToken);
TweetStatus.Update(txtTweet.Text + " - http://www.Go4Sharepoint.com");
}

10) Type in your Message and Press "Shout on Twitter" button























Now, check your twitter account (Example here:http://twitter.com/aspnetmvp )

















Check out Live Demo of Tweet Posting from Asp.net

Monday, June 3, 2013

Why Visual Basic is Better Than C#

10 Reasons Why Visual Basic is Better Than C#

After having converted a whole lot of training materials based on VB.NET into C#, Andy ‘Wise Owl’ Brown decided to write a tongue-in-cheek rant whilst he could still remember the pain-points. 'Convert to VB.NET! You have nothing to lose but your semi-colons! '
Visual Basic is a better programming language than Visual C#. Who says so? This article! Here are 10 reasons why you should always choose VB over C#.

1 – “Rose is a rose is a rose is a rose”

This is a quotation from Gertrude Stein’s 1922 play Geography and Plays. However, the poetry wouldn’t work in C#, because – unforgivably – it’s a cASe-SeNSitIvE language. This is madness!
Before I start ranting, let me just acknowledge that case-sensitivity confers one (and only one) advantage – it makes it easier to name private and public properties:
Writing properties like this means that you can refer to the public Name property, and it’s obvious what the private equivalent will be called (name).
// private version of variableprivate string name = null;public string Name
{
    get
    {
        return txtName.Text;
    
}
    set
    {
        name txtName.Text;
    
}
}
So now we’ve got that out of the way: case-sensitive programming languages make everything else harder. Why, you ask?
  • You keep having to switch between upper and lower case when typing, causing RSI in your poor little fingers as you reach for the inconsiderately located Shift key.
  • You are much more likely to make mistakes - are you sure you meant to type DateOfBirth, or should it have been dateofbirth?
  • When you accidentally leave Caps lock on, it really matters.
The only possible benefit is that you can use more combinations of variable names, that is, you can use more of one of the few infinite resources in this universe…
It doesn’t matter if you disagree with everything else in this article: case-sensitivity alone is sufficient reason to ditch C#!

2 – The Switch clause

Both VB and C# contain a way of testing mutually exclusive possibilities, the Select Case and Switch clauses respectively. Only one of them works properly.
A Visual Basic Select Case clause, returning a description of how old someone is. The age range for a young person is a tad generous, reflecting the age of the author of this article.
A Visual Basic Select Case clause, returning a description of how old someone is. The age range for a young person is a tad generous, reflecting the age of the author of this article.
Select Case AgeEntered

    Case Is 18
        txtVerdict.Text "child"
    
Case Is 50
        txtVerdict.Text "young person"
    
Case Is 65
        txtVerdict.Text "middle-aged"
    
Case Else
        
txtVerdict.Text "elderly"End Select
You can’t do this using Switch in C#, as - astonishingly - it can’t handle relational operators. You have to use an If / Else If clause instead. But even if you could, you’d still have to type in lots of unnecessary Breakstatements:
switch (AgeThreshold{
    case 18 :
        
txtVerdict.Text "child";
        
break;
    
case 50 :
        
txtVerdict.Text "young person";
        
break;
    
case 65 :
        
txtVerdict.Text "middle-aged";
        
break;
    
default:
        txtVerdict.Text "elderly";
        
break;}
 
It’s easy to forget to type in each of these Break statements!

3 – Event-Handling code

This is specific to Visual Studio (I’m using 2010, the latest version). Suppose I want to attach code to anything but the default Click event of a typical button:
Selecting the button
Let’s suppose that I want to attach code to the MouseHover event of this button.
I can do this in Visual Basic without leaving the code window:
a) First choose the object from the drop list.
Attaching the Mousehover code
Choosing the event to code
b)Then choose the event you want to code.
In C# you can’t do this – you have to return to the button’s properties window and choose to show its events:
Selecting the event in C#
You can double-click to attach code to this event for the selected button – but that’s the only simple way to create it for C#.
But it’s even worse than that. If you then rename a control (in this case btnApply) you have to re-associate the event-handler with the renamed control in the properties window (or in the initialisation code, if you can find it). In Visual Basic, of course, you can do all of this in code:
    Private Sub btnApply_Click(ByVal sender As System.Object,
        ByVal e As System.EventArgsHandles btnApply.Click

        MessageBox.Show("Hello")

    End Sub
Globally changebtnApply to the new button’s name in code, and everything will work as before.

4 –Stupid symbols

C# was written by academics. It shows. Consider this table of C# symbols and their VB equivalents:
What you're trying to doC# SymbolVB Equivalent
Test if two conditions are both true&&and
Test if one or other condition is true||or
Test if a condition is not true!not
Concatenate two strings of text+&
Test if a condition is true within an if statement===
Which column looks like it was designed by a real person?

5 – Autocorrection in Visual Basic actually works

IntelliSense works much better for Visual Basic than for Visual C#. Take just one example – creating a write-only property. Let’s start with Visual Basic:
When you press return at the line end…
    WriteOnly Property PersonName As String
        Set(value As String)

        End Set
    End Property
… You get this fully-completed clause.
For C#, the same thing doesn’t happen:
When you press return here, nothing happens (other than a blank line appearing).
This is just one example. I’ve just spent ages transcribing our VB courses into C#, and believe me, there are many, many more!

6 – Lack of supported functions

Here are a couple of functions I use from time to time in VB:
FunctionWhat it does
IsNumericTests if a value can be converted to a number
PMTCalculates the annual mortgage payment for a loan
Great functions, but they don’t exist in C#.

7 – That wretched semi-colon

Why do I have to end every line in C# with a semi-colon? The argument used to be that it avoided the need to use continuation characters in Visual Basic:
MessageBox.Show_
    text:="This article is a bit opinionated"_
    caption:="Message")
You used to have to use an underscore as a continuation character to show incomplete lines of code in VB.
However, as of Visual Basic 2010 you rarely need to do this anymore. Come on, C#: Visual Basic has ditched its line-ending character; why can’t you?(;)
Someone commented on my original (much shorter) blog about this:

    "In a short amount of time you'll type those semi-colons without thinking about it (I even type them when programming in visual basic)."

That’s like saying that you’ll soon get used to not having any matches to light your fire, and you’ll even start rubbing sticks together to start a fire when you finally manage to buy a box!

8 – Arguments and variables

The order of words in a C# variable declaration is wrong. When you introduce someone, you wouldn’t say, “This is my friend who’s a solicitor; he’s called Bob”. So why do you say:
string PersonName "Bob";
To me:
Dim PersonName As String = "Bob"
…is much more logical. I also find the C# method of having to prefix arguments with the word out confusing, particularly as you have to do it both in the called and calling routine.

9 – Strictness

C# is a much fussier language than Visual Basic (even if you turn Option Strict on in Visual Basic, this is still true). “And a good thing, too!”, I hear you cry. Well, maybe. Consider this Visual Basic code:
Enum AgeBand
   Child 18
   Young 30
   MiddleAged 60
   SeniorCitizen 90
End Enum



Select Case 
Age
    Case Is AgeBand.Child
        MessageBox.Show("Child")
    
Case Else
        
MessageBox.Show("Adult")End Select
With Option Strict turned on this shouldn’t really work, as it’s comparing an integer with an enumeration – but VB has the common sense to realise what you want to do.
The equivalent in Visual C# doesn’t work:
A less forgiving language…
What this means is that you end up having to fill your code with messy type conversions:
The simplest way of converting an enumeration to an integer; but why should you have to?
// find out the age enteredint Age Convert.ToInt32(txtAge.Text);if (Age < (intAgeBand.Child) {
    MessageBox.Show("Child");} else {
    MessageBox.Show("Adult");}

10 – Redimensioning arrays

If you want to dynamically change the length of an array in Visual Basic, you can use Redim Preserve. To do the same thing in Visual C#, you have to copy the array, add a value and then copy it back:
The vile, clunky C# method of extending an array.
string[] PartyGuests = new string[2];PartyGuests[0] "Sarah Palin";PartyGuests[1] "Richard Dawkins";// whoops! forgot to invite Mitt

// create a new extended array
string[] tempGuests = new string[PartyGuests.Length + 1];// copy all of the elements from the old array into new oneArray.Copy(PartyGuests,tempGuests,PartyGuests.Length);// add Mitt as last elementtempGuests[PartyGuests.Length] "Mitt Romney";// restore full list into original arrayPartyGuests tempGuests;// check worksforeach (string Guest in PartyGuests{
    System.Diagnostics.Debug.Write(Guest);}
 
This epitomises Visual C# for me. Critics will tell me that:
  • Behind the scenes, the Redim Preserve command does exactly the same thing as the C# code above; and
  • I should be using lists and not arrays anyway.
That’s hardly the point! The point is that - as so often - Visual Basic makes something easier to code than C# does.

Conclusion

So those are my 10 reasons to code in Visual Basic. What are you waiting for, all you C# code-monkeys? Convert all of your code to VB – you have nothing to lose but your semi-colons!

Original post is:https://www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/