Category Archives: ASP.NET 3.5

How to close all windows upon signout?

This solution might not be the exact solution to close all open windows, but it does close all windows upon clicking sign out. First, you need to create a sign out button on your master page. Then put this code … Continue reading

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

How to export to pdf or excel in ASP.NET 3.5?

Here are my references for export to pdf or excel: Reference 1 Reference 2 Reference 3 Reference 4 Reference 5 Reference 6

Posted in ASP.NET 3.5, Excel, PDF | 1 Comment

How to create code generator for your data objects, data access layer and business access layer?

This post of mine shows how I create DAL, BAL, Data entity objects, interface. This code generator will generate code for this .cs file. First, this is how it looks like when you are creating DAL, Second, this is how … 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 | 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