Gary Davis' Blog

DotNET/PayPal Development and other Techie Stuff
posts - 45, comments - 129, trackbacks - 0

May 2011 Blog Posts

How to Enable jQuery Intellisense in Your MVC 3 Razor Code

You probably include your <script> to pull in the jQuery JavaScript in your layout.cshtml (master page in Razor), perhaps something like this: <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.6.2.min.js" type="text/javascript"></script>   But your code pages that use jQuery do not show Intellisense. To enable Intellisense, add this to the top of the pages so Visual Studio has a reference to the vsdoc which is hosted by the Microsoft CDN: @if (false) {<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.6.2.min.js" type="text/javascript" />}   The if statement will prevent the script tag from being emitted to the browser since it is only needed for Visual Studio development. It is not necessary to specify the path to the vsdoc file...

posted @ Monday, May 30, 2011 12:00 AM | Feedback (1) | Filed Under [ Programming ]

Log Your Website Visitor Out of Facebook

One of my webs lets the user authenticate using the Facebook OAuth 2.0 Graph protocol. When the user clicks the Logout button, a call is made (Http redirect) to Facebook to have it log the user off Facebook and my site and then it returns to my site to display my page with the button now showing Login instead of Logout. The user never sees any Facebook page during the logout. The way this works is to pass a parameter to Facebook that indicates the url to return to when it is done. A few weeks ago, this stopped working. Instead...

posted @ Thursday, May 26, 2011 12:00 AM | Feedback (0) | Filed Under [ Programming ]

Powered by:
Powered By Subtext Powered By ASP.NET