Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

JavaScript RegEx Pattern for URLs

AddThis Social Bookmark Button
Here is a simple JavaScript RegEx pattern for extracting any URL that begins with htttp:

The browser landscape is changing

AddThis Social Bookmark Button
I hadn’t really been paying attention to the popularity of browsers a whole lot for the last few months until this week as I was teaching HTML5 and the usage stats influence what is usable and what not. Sure I heard some time ago that Chrome was larger then IE but as most of these statistics are more about politics then anything else I tend to ignore them and just check some sites I know are producing real numbers for me. And the best I know way is to compare Google Analytics on some large sites.   And
was I surprised this week when I checked.   These are the stats I collected last December for an HTML5 presentation I did back then: As you can see there are three big players and Internet Explorer was the biggest with a 42% market share. Now your stats may vary slightly but I would be very surprised they where very different for a general purpose website.   However when I checked this week things where very different. The total number of visits may be down quite a bit...(Read whole news on source site)

Episode #205: Consuming a Web Api Endoints

AddThis Social Bookmark Button
Author: Derik Whittaker

This episode we are we are going to take a another look at the Asp.Net Web Api framework. However, in this episode we are going to look at how we can consume an endpoint in our console application. We will learn how to create the connection as well as how to handle the data which we recieve from our call.


Watch Here
View Details Here


How to display a datetime in the client local timezone in ASP.NET MVC views

AddThis Social Bookmark Button
For my website http://www.watzdprice.com I ran into a problem where I needed to show a datetime from a ViewModel in the client local timezone. The problem is that the Razor views are rendered on the server and the server doesn’t know the users timezone. So we have to create a client side solution. We have [...] Share on Facebook Retweet this

JSON POST with ASP .NET Web API

AddThis Social Bookmark Button
I have been struggling a bit with porting existing Json calls to the new ASP .NET Web API framework. I actually got the GET request working pretty quickly, but it were the POST (and DELETE en PUT) requests that were giving me headaches. Problem is the current brevity and lack of practical examples for the Web API framework. So here goes a short example of getting a Json POST up and running.

For these examples I used the Visual Studio 2011 beta version.

Let's first start with the GET request. What you need for this is the
HttpClient class, which can be found in the System.Net.Http namespace. This class provides methods like GetAsync, PutAsync, DeleteAsync and PostAsync. The 'Async' extensions let you know that you can use the new async and await keywords to get this up and running. A GET requests with the HttpClient consists of only two lines of code.

var client = new HttpClient();
var response = await client.GetAsync("http://some_url/resource_name/resource_id");
response.EnsureSuccessStatusCode();

All of this is contained in a method that has the extra async keyword. I also added the EnsureSuccessStatusCode call to verify my call to the REST service didn't fail. If the...(Read whole news on source site)

Filtering collections from XAML using CollectionViewSource

AddThis Social Bookmark Button
source: spikie.be I find that I often run into the need of separating a collection of items into several collections just so I can bind them to multiple listboxes, for example a list of sessions spanning several tracks and each track is shown in his own listbox in a pivotitem. To get this done you can start by adding multiple collections to your viewmodel and divide the items there. However this makes your viewmodel very big in a very short time. A better way to do this is using CollectionViewSource items in XAML. Let me show you how.
First thing I did was building a demo class existing out of a title and a description, these two properties will be shown in the listbox later on. A third property is the one we'll use to filter the data, here's the completed class. ...Read more ...(Read whole news on source site)

Home