Tag: How to
How to Programatically Send Email with attachments in Windows Phone 8.1 using C# ?
Below is a sample code snippet that demonstrates how to send email with attachments programmatically in Windows Phone 8.1 using C# . How to Programatically Send Email with attachments in Windows Phone 8.1 using C# ?
How to get the first day of the month in SQL Server ?
If you want to get the first day of the month of a input datetime variable from a SQL Query , here’s how you do it.
Url.Action in ASP.NET MVC
The Url.Action method in ASP.NET MVC allows the developers to generate the fully qualified URL to an action method. It is defined in the namespace System.Web.Mvc. The Url.Action generates only the URL unlike the Html.ActionLink. Url.Action in ASP.NET MVC Below is a code snippet of the View demonstrating the Url.Action
How to Declare and Define an Boolean data type variable in F# ?
How to Declare and Define an Boolean data type variable in F# ?
How to refer to the file in Windows Phone app using ms-appx ?
When using the Speech recognition , you might refer to the Voice Command Definition file within your project . Assuming that the file name is AbundantcodeGrammar.xml . you might refer to the file with the ms-appx as shown below. new Uri(“ms-appx:///AbundantcodeGrammar.xml”,UriKind.RelativeOrAbsolute); When referring to the file at runtime , there are times when you might receive an error 0x80070002 error – The system cannot find…
How to accept HTML Form Data in a ASP.NET Web API Action Method ?
There are times when you might want to create an endpoint in ASP.NET WebAPI that can handle the HTML form data posted as x-www-form-urlencoded. One of the options is to use the model binding concept. In this case , the model should have the names of the keys that are passed in the HTTP request. The MediaFormatters are used to extract the data from…
How to Populate the DropDownList in ASP.NET MVC Razor View?
The DropDownList is one of the most useful controls that can be used in various scenarios that involves selecting the data from the list. The ASP.NET MVC Framework provides the Html.DropDownList and Html.DropDownListFor helper methods which can be used to create DropDownList. How to Populate DropDownList in ASP.NET MVC Razor View? Below is a sample source code demonstrating how to Populate DropDownList in ASP.NET MVC…
How to Auto Refresh page every 5 seconds using JavaScript?
Below is a sample code demonstrating how to refresh the page automatically every 5 seconds using JavaScript. How to Auto Refresh page every 5 seconds using JavaScript?
Which Events to use to Save the Transient State in Windows Phone 8?
It is necessary for the developers to save the transient and the persistent state of the app when the application goes to the deactivated status. Which Events to use to Save the Transient State in Windows Phone 8? The PhoneApplicationPage’s OnNavigatedFrom and OnNavigatedTo methods can be used to save the transient state in Windows Phone 8.
How to Sort Array Elements in Ascending Order in C#?
The Array class includes static method called Sort which can be used to sort the array in ascending order in C#. Array.Sort(<arry>); How to Sort Array Elements in Ascending Order in C#? Below is a sample code snippet demonstrating sorting of array elements in ascending order in C#.
Different Types of For Loops in F#
F# supports 3 different types of For Loops . These include For…to – This is astandard for loop For .. In – This is similar to For Each in C# for…downto Different Types of For Loops in F# Below is a code snippet demonstrating the different For Loops in F#
How to find all instances of a pattern in JavaScript ?
To find out out all the instances of a pattern in JavaScript , you can use the regular expression as showb below. How to find all instances of a pattern in JavaScript ?
How to Launch the Email and Accounts Settings App using URI Scheme in Windows Phone 8?
Below is a sample code snippet demonstrating how launch the Email and Accounts Settings App via the URI Scheme and LaunchUriAsync method in Windows Phone using C#. How to Launch the Email and Accounts Settings App using URI Scheme in Windows Phone 8?
How to send email in Windows Phone 8 Application Programatically using C#?
The Windows Phone 8 SDK provides the EmailComposeTask which can be used to send email in Windows Phone 8 Programatically. The EmailComposeTask launches the Email Compose screen which lets the user to verify the email content and tap on the “send” button to send email. How to send email in Windows Phone 8 Application Programatically using C#? Below is a sample code snippet that demonstrates…
How to escape a single quote in SQL Server ?
You can escape a single quote in your T-SQL query in SQL Server by simply doubling them. Here’s a simple example that demonstrates how the single quote ie escaped in SQL Server. How to escape a single quote in SQL Server ?
How to merge two lists using LINQ’s Union in C#?
Below is a sample code snippet demonstrating in simple steps on how to merge two lists using LINQ’s Union extension method in C#? How to merge two lists using LINQ’s Union in C#?
How to Implement Multiple order by in LINQ using C#?
There are scenarios where one might want to implement multiple order by statements when using LINQ in C#. For example, you might want to sort the list of article by category and then by date. Below is a sample code snippet that demonstrates how to How to Implement Multiple order by in LINQ using C# ? How to Implement Multiple order by in LINQ using…
How to Remove Duplicates and Get Distinct records from List using LINQ?
Below is a sample source code demonstrating on how to remove duplicates and get distinct records in List using LINQ and C#?
The Windows Phone Emulator wasn’t able to ensure the virtual machine was running
Today , I encountered the below error when trying to run my windows phone project after upgrading my system from Windows 8 to Windows 8.1 The Error Message was “The Windows Phone Emulator wasn’t able to ensure the virtual machine was running: Something happened while starting a virtual machine:”Emulator WVGA.<Name>” could not initialize(Virtual machine ID <ID>) Not enough memory in the system to start the…
C# Program to display "Hello, World!"
Problem Statement Write a program in Visual C# to print Hello World in the console Window. How to display Hello World in C# ? Output Hello, World!