If you read a lot of industry magazines and ASP.NET code samples, you may find that, although the majority use Response.Redirect to send the user to another page, some seem to prefer the rather mysterious-sounding Server.Transfer. So, what's the difference?
Well, Response.Redirect simply sends a message down to the browser, telling it to move to another page. So, you may run code like:
Response.Redirect("WebForm2.aspx")
or...>
Read more...
2/26/2008 9:33:30 PM
Published by
FengLiN
Category
ASP.NET
Views (636)
Recently, a friend mentioned that someone had told him that writing a try...catch block in C# (or substitute some other .Net language here) resulted in a " huge penalty " in terms of performance compared to if you had not written it. That is, merely writing such a block actually hurt program performance, even if an exception was never thrown. He didn't believe this was true, and rightly so - it's completely wrong. This post is a tidied up...>
Read more...
2/25/2008 12:55:59 AM
Published by
FengLiN
Category
C Sharp(C#)
Views (624)
Have you ever seen a file with a pretty icon you wanted to use but you couldn't get a similar one in your program? If yes, try this method >> Icon.ExtractAssociatedIcon here is the code I wrote that works fine, you will also find the sample attached Icon ico; public Form1() { InitializeComponent(); ico = this.Icon; } private void btnGetIcon_Click(object sender, EventArgs e) { if(dlgOpen.ShowDialog() ==...>
Read more...
2/25/2008 12:47:00 AM
Published by
FengLiN
Category
C Sharp(C#)
Views (674)
In this article, I will cover at a glance the new features of C# 3.0. I have been working with this new development environment for several days and want to share my experience with you Implicit typed local variables Local variables can be declared as type var, whose actual type of the variable is determined by the compiler based on the data schema (see Listing 1). It's mainly used to store anonymous types in LINQ. ...>
Read more...
2/13/2008 10:26:00 PM
Published by
FengLiN
Category
C Sharp(C#)
Views (708)
This guide covers Microsoft's recommended approach for implementing performance testing for Web applications. These provide steps for managing and conducting performance testing. For simplification and tangible results, they are broken down into activities with inputs, outputs, and steps. You can use the steps as a baseline or to help you evolve your own process. The performance-testing approach used in this guide consists of the following activities...>
Read more...
2/13/2008 9:02:10 AM
Published by
FengLiN
Category
ASP.NET
Views (674)
We all know the term compilation in Asp.Net. But do you know what is the order of compilation in an asp.net project. Do you know which folder in the application structure gets compiled first and which when get compiled last?
Here is the compilation life cycle of an Asp.Net project in the order they get compiled.
App_GlobalResources: First of all the global resources are compiled and the resource assembly is built. All the assembly's in...>
Read more...
2/5/2008 10:54:23 PM
Published by
FengLiN
Category
ASP.NET
Views (772)
1. using + namespace:
So you can use the type under the namespace directly, without type in the full namespace name. similar with Jave's Import.
Example: using System.Data;
2. using + Alias Name = full type name.
when to use: You can use this when you using 2 different namespaces in 1 cs file. but these 2 different namespaces contains a type with same name.
example:
using aClass = NameSpace1.MyClass;
using bClass = NameSpace2.MyClass;...>
Read more...
2/5/2008 3:51:23 AM
Published by
FengLiN
Category
C Sharp(C#)
Views (770)
Today I will talk about the " System.IO.FileSystemWatcher". It allows you to be notified when a file or directory (folder) has been created, renamed, changed or deleted. You can even sit and wait for such an activity to take place. Ok, Let me show you how to use this class. 1. Create a new object of FileSystemWatcher. System.IO.FileSystemWatcher fswXmlFileWatcher = new System.IO.FileSystemWatcher(); this.fswXmlFileWatcher.EnableRaisingEvents...>
Read more...
1/30/2008 1:37:00 AM
Published by
FengLiN
Category
C Sharp(C#)
Views (1241)
The CorssArticle module is basically an extension of the efficionconsulting articles module 3.2beta (http://www.efficionconsulting.com/) . thanks for the great job of David O'Leary(the author of efficionconsulting articles module). And this version also includes some changes from Shengfu Mao. I also had made some changes into it. :)
1. Enable rich text box in IE 7.
2. correct the sql install sripts.
The below is added by Shengfy...>
Read more...
1/26/2008 8:27:50 AM
Published by
FengLiN
Category
DNN Skins & Modules
Views (1814)
I want to export dataset data into excel with number, date format support, but I do not want to install Excel in my server. I donot have the licences. here is the code for you. the following code use xml to handle the excel.
Download Source Code here
Imports Microsoft.VisualBasic
Imports System.Data
Imports System.IO
Public Class WorkBookEngine
Public Sub CreateWorkbook(ByVal dt As DataTable, ByVal Filename...>
Read more...
1/25/2008 2:25:14 AM
Published by
FengLiN
Category
ASP.NET
Views (3020)