Monthly Archives: April 2011

How to create CRUD using Linq to Entity in ASP.NET 4?

In this project, I use Microsoft Visual C# 2010 Express Edition and Microsoft Visual Web Developer 2010 Express Edition You need to create a class library project first. Then create a ADO.NET Entity Framework, then create a class and interface … Continue reading

Posted in .NET Framework 4, C# 4.0 AND ASP.NET 4.0, Linq to Entity | Leave a comment

How to apply CRUD and linq to entity on gridview using ASP.Net 3.5?

Before you start, you need the following software or installer: Visual Studio 2008 Professional Edition/ Team System Edition Visual Studio 2008 Service Pack 1 .NET Framework 3.5 .NET Framework 3.5 Service Pack 1 Windows 7 or Windows XP You need … Continue reading

Posted in ASP.NET 3.5, ASP.NET 3.5 And C# 3.5, C# 3.5, C# 3.5 and ADO.NET Entity Framework 3.5, Linq to Entity | Leave a comment

How to use comparevalidator to compare date in ASP.NET 3.5?

In designer, <asp:CompareValidator ID=”cvReturnDate” runat=”server”                             ControlToValidate=”txtReturnDate”                             ErrorMessage=”Return date must be valid date.” Type=”Date”                             ValidationGroup=”validateInquiry” >*</asp:CompareValidator> In Code,                     this.cvReturnDate.Operator = ValidationCompareOperator.GreaterThan;                     this.cvReturnDate.ValueToCompare = DateTime.Now.ToShortDateString(); or you just want to check if it is a date, the … Continue reading

Posted in ASP.NET 3.5, ASP.NET 3.5 And C# 3.5, C# 3.5 | Leave a comment

How to display messagebox in asp.net 3.5?

There are many ways to show or display message. I have two ways: First way is this, ScriptManager.RegisterStartupScript(this, this.GetType(), “onclick”, “alert(‘” + message + “‘);”, true);  Second way is this, String scriptString = “<script language=JavaScript>”; scriptString += “alert(‘” + message … Continue reading

Posted in ASP.NET 3.5, ASP.NEt And C# 3.5 And Javascript, C# 3.5, JavaScript | Leave a comment

How to create a unit test using Microsoft.VisualStudio.TestTools.UnitTesting in Visual Studio 2008 Professional Edition?

To be able to perform unit testing in Visual Studio 2008 Professional Edition, you need either visual studio 2008 professional or team system edition. Step 1 – Right click your solution then click on Add then click on new project. … Continue reading

Posted in C# 3.5, C# 3.5 and ADO.NET Entity Framework 3.5, C# 3.5 And Unit Test And Test Project, Test Project, Unit Test | Leave a comment

How to create an ADO.NET Entity Framework Model in .NET 3.5 Framework?

Here are the software/installer that you need before using ADO.NET Entity Framework: Visual Studio 2008 Professional Edition/Team System Edition .NET Framework 3.5 Microsoft SQL Server 2005 .NET Framework 3.5 Service Pack 1 Visual Studio 2008 Service Pack 1 Second, Create … Continue reading

Posted in C# 3.5 and ADO.NET Entity Framework 3.5, Linq to Entity | Tagged , | Leave a comment