Monthly Archives: May 2011

Change from Thread to Task (Parallel Programming)

Each thread also consumes (by default) around 1 MB of memory. The thread pool cuts these overheads by sharing and recycling threads, allowing multithreading to be applied at a very granular level without a performance penalty (Albahari, 2010).   The … Continue reading

Posted in .Net | Tagged , , | Leave a comment

Configure ASP.NET Web Application to use Database Session – video

1. Once you have created the database to keep the session.   2. Watch the video below.   Configure ASP.NET Web Application to use Database Session

Posted in .Net | Tagged | Leave a comment

Convert ASP.NET Website to Web Application in Visual Studio 2010 – video

1. Open the Website. 2. Add a Empty Web Application project. 3. Drag and Drop all the files from the Website. 4. Right click the Web Application and select Convert to Web Application.   Watch the video below.   Convert … Continue reading

Posted in .Net | Tagged | Leave a comment

One of the problems of ASP.NET MVC 2

What will the problem like?   1. Download the sample MvcApplication1.rar from ASP.NET MVC 2 simplest sample – video.   2. Go to  About.aspx and change   <asp:Content ID=”aboutContent” ContentPlaceHolderID=”MainContent” runat=”server”>     <h2>About</h2>     <p>         <%: ViewData[“Message”] %>     … Continue reading

Posted in .Net | Tagged | Leave a comment

ASP.NET MVC 2 simplest sample – video

1. Create MVC 2 project.   2. Add MathLib class into Models folders.   using System; using System.Collections.Generic; using System.Linq; using System.Web;   namespace MvcApplication1.Models {   public class MathLib   {     public static int Add(int num1, int num2) … Continue reading

Posted in .Net | Tagged | 1 Comment

CRUD using AseDataAdapter for SyBase

1. Copy the code from Good practice of CRUD by creating SqlDataAdapter when you cannot use Entity Framework episode 1.   2. Add reference to SyBase.Data.AseClient.   3. Rename SqlDataAdapter to AseDataAdapter.   4. Rename SqlCommand to AseCommand.   5. … Continue reading

Posted in .Net | Tagged | 2 Comments

Good practice of CRUD by creating SqlDataAdapter when you cannot use Entity Framework episode 4 – sample

In episode 3, we added a button to update to the customer table. In this episode we do the following.   1. Add a button to delete the rows.   2. Add the following code to the click event of … Continue reading

Posted in .Net | Tagged | Leave a comment

Good practice of CRUD by creating SqlDataAdapter when you cannot use Entity Framework episode 3 – sample

In episode 2, we added a button to read to the customer table with city and country filter. In this episode we do the following.   1. Add a button to update all the rows.   2. Add the following … Continue reading

Posted in .Net | Tagged | 1 Comment

Error: The server is not operational. Troubleshooting Exceptions: System.Runtime.InteropServices.COMException

If you got the error message “The server is not operational. Troubleshooting Exceptions: System.Runtime.InteropServices.COMException” then you might have added a wrong reference.   I solved this error by removing the System.Web.ApplicationServices. See the picture below.  

Posted in .Net | Tagged | 2 Comments

Good practice of CRUD by creating SqlDataAdapter when you cannot use Entity Framework episode 2 – sample and video

In episode 1, we added a button to do insert to the customer table. In this episode we do the following.   1. Add a button to read all the rows.   2. Add a GridView to display all the … Continue reading

Posted in .Net | Tagged | 2 Comments