Posted by admin as Asp.Net
Microsoft just made a bunch of eBooks free to download. Grab them while they are free.
Moving to Microsoft Visual Studio 2010 Programming Windows 8 Apps Programming Windows Phone 7 [...]
It is very easy to convert a string to stream and vice versa in .Net.
Converting String to Stream:
MemoryStream stream = new MemoryStream();
StreamWriter writer = new StreamWriter(stream);
if you already know the encoding of your string, you can also use
byte tempByteArray = Encoding.ASCII.GetBytes(myString);
MemoryStream stream = new MemoryStream(tempByteArray);
Converting Stream to String:
StreamReader reader = new StreamReader(stream);
stream.Position = 0;
In a .Net 4.0 or later web application you may receive an error similar to
“The configuration section yoursection cannot be read because it is missing a section declaration”
when you try to get the web configuration information using Microsoft.Web.Administration.ServerManager API even when your web.config file looks alright and you do declare “yoursection” in the [...]
On windows Phone, you can easily use templates to change the default UI for most of the controls. In this post, I am giving an example of how to change the color of a scroll bar in a list box. The template I provided here is extensive and can use used to change many things [...]
The other day I was struggling to write a small LINQ query, and after searching for a while I found this awesome page on MSDN which has about 101 LINQ samples. The samples cover most of the basic LINQ stuff that one would need. Here is the location
101 LINQ Samples: @ http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx
One of the requirements in publishing media related apps for windows phone is that you have to prompt user a message asking his permission to continue if a media file is already being played in the background.
Here is the actual text from the app requirements
6.5.1 Initial Launch Functionality When the [...]
One weird issue I ran into the other day when trying to write an app for Windows Phone is a Grid control I placed inside a data bound Listbox refused to stretch 100% and is always being defaulted to the “auto” width. I running around all the internet for a day and failing to find [...]
There are several situations where in you might want to change the font style or font color etc. styles to the default phone styles when developing for Windows Phone. This is very easy and straight forward to achieve in xaml. All you have to do in xaml is set the style property to the static [...]
When running a PowerShell script using a RunSpace in .Net there might be several occasions where you need to import a module to run your script. They are two different ways to achieve this. Simplest way is to include the “Import-Module” statement as a part of your command. For example..