Creare App per Windows Phone 8

    Oggi è stato pubblicato il libro di Enrico Rossini Creare App per Windows Phone 8 Concetti di base. Nel mercato degli smartphone è arrivato da qualche tempo il nuovo sistema operativo di Microsoft, Windows Phone, che rappresenta un taglio netto con il passato: nuova architettura, nuova user experience, nuova grafica e anche nuovi strumenti di…

    Read More

    Checking the Internet connection type on Windows Phone

    All Windows Phone applications that use Internet data should always check if there is a valid Internet connection; if there is no connection, a proper message should be displayed to the user. The correct way to check if you have an Internet connection (WIFI, Ethernet, or none) is by checking the property: NetworkInterface.NetworkInterfaceType Unfortunately checking…

    Read More

      Checking network availability in Windows Phone

      Many applications utilize network connection for various purposes like feeds, sending & receiving data to/from server, etc. The following article explains how one can detect if the network connection is available or not. Network API Information NetworkInterface Class helps in providing network information to the developers. It helps detect if the network is on/off, address…

      Read More

        Enabling quick resume for Windows Phone apps

        This article explains how to quickly resume the Windows Phone 8 application which is put in the background.   Introduction Whenever your app loses focus (is put in the background), an instance of the app is saved. This instance is used to resume the app if the user tasks to it from a deep link…

        Read More

          Make the application loosely coupled

          In this series of tutorials, we build an entire Contact Management application from start to finish. The Contact Manager application enables you to store contact information – names, phone numbers and email addresses – for a list of people. We build the application over multiple iterations. With each iteration, we gradually improve the application. The…

          Read More

            Add form validation ASP.NET MVC

            Building a Contact Management ASP.NET MVC Application (C#) In this series of tutorials, we build an entire Contact Management application from start to finish. The Contact Manager application enables you to store contact information – names, phone numbers and email addresses – for a list of people. We build the application over multiple iterations. With…

            Read More

              Dynamic Pivot Linq C#

              I have the following collection / table Category Type Detail CostAuto Hybrid AC 80Auto Hybrid Sunroof 100Auto Standard AC 120Motorcycle Standard Radio 60 Is there a way with linq to get this to pivot to look like this? Category Type AC Radio Sunroof Auto Hybrid 80 0 100 Auto Standard 120 0 0Motorcycle Standard 0…

              Read More

                Pro ASP.NET MVC 5

                The ASP.NET MVC 5 Framework is the latest evolution of Microsoft’s ASP.NET web platform. It provides a high-productivity programming model that promotes cleaner code architecture, test-driven development, and powerful extensibility, combined with all the benefits of ASP.NET. ASP.NET MVC 5 contains a number of advances over previous versions, including the ability to define routes using…

                Read More

                  DVLUP

                  DVLUP HELPS DEVELOPERS BECOME MORE SUCCESSFUL HAVE FUN. EARN REWARDS. BUILD NEW IDEAS. By joining DVLUP, you’ll get exclusive access to App Challenges, news, events, partner opportunities and more. Earn points to redeem for Rewards, including promotional placements for your Apps. And if exclusive access and glory aren’t enough, we’ve got more badges than the…

                  Read More

                    Windows Phone 8 Battery API

                    The Battery API makes a nice addition to the WP8 SDK. I can see in the near future that some applications will display the battery metrics on a Live Tile or in the application that hides the System Tray. The Battery API is pretty easy to use: Get the Battery instance with Battery.GetDefault() Bind to…

                    Read More

                      How to get the server IP Address?

                      string myHost = System.Net.Dns.GetHostName(); // Show the hostname MessageBox.Show(myHost); // Get the IP from the host name string myIP = System.Net.Dns.GetHostEntry(myHost).AddressList[index].ToString(); // Show the IP MessageBox.Show(myIP);

                      Read More

                      Add Rows to a DataTable

                      To add new records into a dataset, a new data row must be created and added to the DataRow collection (Rows) of a DataTable in the dataset. The following procedures show how to create a new row and insert it into a DataTable. Examples are provided for both typed and untyped datasets. I created this…

                      Read More

                        Proper MIME types for Embedded @font-face Fonts

                        After some exhaustive research, I managed to find the best server settings for serving web fonts. There are a number of font formats that one can set MIME types for, on both Apache and IIS servers. I’ve traditionally had luck with the following: svg as “image/svg+xml” ttf as “application/x-font-ttf” or “application/x-font-truetype” otf as “application/x-font-opentype” woff…

                        Read More

                          Create DataTable

                          Data is read from a database. It is generated in memory from input. DataTable is ideal for storing data from any source. With it we take objects from memory and display the results in controls such as DataGridView. The DataTable type is a powerful way to store data in memory. You may have fetched this…

                          Read More

                            Parse HTML page and capture contents

                            Here I show a simple class that receives the HTML string and then extracts all the links and their text into structs. It is fairly fast, but I offer some optimization tips further down. It would be better to use a class. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; namespace…

                            Read More

                            DateDiff() function in C#

                            I have written the following DateDiff() function in C#. VB.NET users already had it using the Micrsoft.VisualBasic.dll assembly. Now you can use it without referencing this ‘ugly’ extra assembly. using System; namespace PureSourceCode.System { public enum DateInterval { Year, Month, Weekday, Day, Hour, Minute, Second } public class DateTimeUtil { public static long DateDiff(DateInterval interval,…

                            Read More

                            Create a File or Folder

                                    // Specify a name for your top-level folder.         string folderName = @”c:\Top-Level Folder”;         // To create a string that specifies the path to a subfolder under your          // top-level folder, add a name for the subfolder to folderName.         string pathString = System.IO.Path.Combine(folderName, “SubFolder”);         // You can write out the…

                            Read More

                              Populate DropDownList with Selected Value in EditItemTemplate of GridView in ASP.Net

                              In this article I will explain with an example how to use ASP.Net DropDownList control in the EditItemTemplate of ASP.Net GridView control. I created this GridView with EditItemTemplate. <asp:GridView ID=”GridView1″ runat=”server” AllowPaging=”True” AllowSorting=”True” AutoGenerateColumns=”False” AutoGenerateEditButton=”True” DataKeyNames=”CodeAction” OnRowEditing=”GridView1_RowEditing” OnRowDataBound=”GridView1_RowDataBound” OnRowUpdating=”GridView1_RowUpdating” OnPageIndexChanging=”GridView1_PageIndexChanging” OnRowCancelingEdit=”GridView1_RowCancelingEdit”> <Columns> <asp:CommandField ShowSelectButton=”True” /> <asp:BoundField DataField=”CodeAction” HeaderText=”CodeAction” ReadOnly=”True” SortExpression=”CodeAction” /> <asp:BoundField DataField=”Description” HeaderText=”Description” SortExpression=”Description”…

                              Read More

                                ASP.NET Menu and SiteMap Security Trimming

                                With ASP.NET 2005 Microsoft introduced a pretty solid menu which is integrated with a configuration driven sitemap. The cool part is that the menu can be hooked in with your security roles, so you don’t have to worry about hiding or showing menu options based on the user – the menu options are automatically kept…

                                Read More