Monthly Archives: October 2011

Roslyn Script Engine sample

The code of this sample is taking from Anders’s Build 2011 video. I put them in a project if you are lazy to type.   classProgram {   staticvoid Main(string[] args)   {     ScriptEngine engine = new ScriptEngine();     … Continue reading

Posted in .Net | Tagged | Leave a comment

Simple Roslyn sample

I have not found a sample Roslyn project that can download and run. I have put the code in the blog http://blogs.msdn.com/b/visualstudio/archive/2011/10/19/introducing-the-microsoft-roslyn-ctp.aspx into a project so you can download and run it.   classProgram {   staticvoid Main(string[] args)   … Continue reading

Posted in .Net | Tagged | Leave a comment

Visual Studio 11 Developer Preview Training Kit

It is good to try this out. Some samples I have tried and there run. http://www.microsoft.com/download/en/details.aspx?id=27738 Download VS11 if you do not have one. http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27543

Posted in .Net | Tagged , | Leave a comment

Mango Nokia phone model Lumia 800

Finally Nokia has a Windows Phone 7.5. http://www.microsoft.com/windowsphone/en-us/buy/7/details.aspx?cmpid=ENKPHERBUYWCTAEN-US&id=1753

Posted in Community | Tagged | Leave a comment

How to remove the grey background from Microsoft Word

When some people look at the picture below then they most likely will guess it is a text highlight or table cell. Unfortunately it is neither of it.   It is actually shading.  See the video below. How to remove … Continue reading

Posted in Community, Microsoft Office | Tagged | 4 Comments

Column does not appear in Dataset xsd

As shown in picture below. Notices column is missing from Dataset.   The reason is the data type for Notices is nvarchar(MAX). Change the data type if you want it to appear automatically.

Posted in .Net | Tagged | Leave a comment

How to: Export MySQL table to Excel

  1. Read MySQL Table into DataReader.   publicMySqlDataReader MySQLConnect() {   string strConn = ConfigurationManager.ConnectionStrings[“dbConnectionString”].ConnectionString;   MySqlConnection conn = newMySqlConnection(strConn);   conn.Open();     string strSQL = “SELECT * FROM om_org_structure_ostr”;   MySqlCommand cmd = newMySqlCommand(strSQL, conn);     … Continue reading

Posted in .Net | Tagged , | 14 Comments

How to generate a basic app.config file for console project

Watch the video below. There is no app.config file in the solution explorer at the beginning. How to generate a basic app.config file for console project

Posted in .Net | Tagged , | Leave a comment

ASP.NET vNext Model Binding – Filtering

1. Get sample from ASP.NET 4.5 Model Binding to IQueryable. 2. Add the follow code to aspx page. <asp:DropDownListID=”employeeid”runat=”server”AutoPostBack=”true”        SelectMethod=”GetCompetency”  AppendDataBoundItems=”true”         DataTextField=”EmpID”DataValueField=”EmpID”OnDataBound=”employeeid_DataBound”>   </asp:DropDownList>   3. Edit the GetCompetency method. publicIQueryable<Employees> GetCompetency([Control]int? employeeid) {   Competency cp = … Continue reading

Posted in .Net | Tagged , | Leave a comment

VS2010 Parallel Computing Features Tour source code

You will not able to find the source code here I bet. Don’t worries about type in. Go to my skydrive and get it there.   Download the complete code from http://skydrive.live.com. The sample file name is ConAppParallelPattern.rar. My MSN … Continue reading

Posted in .Net | Tagged , | Leave a comment