Create Resource Files for ASP.NET Web Sites

http://www.codeproject.com/KB/aspnet/GlobalizingLocalizing.aspx

1) create mybasePage class
public class mybasePage:Page
{
public mybasePage()
{
//
// TODO: Add constructor logic here
//
}
static string cultureName;

public static string CultureName
{
get { return cultureName; }
set { cultureName = value; }
}

protected override void InitializeCulture()
{

if (!String.IsNullOrEmpty(cultureName))
{
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(cultureName);

Thread.CurrentThread.CurrentUICulture = new
CultureInfo(cultureName);
}

base.InitializeCulture();
}

}

2. default.aspx source












style="height: 26px" />


Go to Sample Page



code:
protected void Button1_Click(object sender, EventArgs e)
{

CultureName = DropDownList1.SelectedItem.Value.ToString();

}
3)create sample.aspx page: source




Set
Language



4) create resource files
Sample.gu-IN.resx,Sample.mr-IN.resx,Sample.resx

How To configure SQL server to store session state

http://blogs.msdn.com/b/akshayns/archive/2008/10/04/how-to-configure-sql-server-to-store-a-session-state.aspx



http://msdn.microsoft.com/en-us/library/ms178586.aspx

Difference and Similarity between Dispose/Finalizer/Destructor:

1. Dispose called by CLR. Finalizer called by GC

2. Dispose and Finalizers can clean unmanaged resources. After Dispose -> GC will be called, also after Finalizer->GC will be called but this will be the second time, so Finalizer has performace issues.

3. Finalizers if implemented will always be called, unless GC.SupressFinalizer is called from Dispose. Dispose shall be called only if IDispoable interface is implemented

4. If none of Dispose and Finalizer is present then the Destructor is called?

I do not understand this - Dispose or Finalize methods (it depends on which method is called earlier): I guessed it will always be Dispose followed by Finalizer, when will it be other way round.

5. Why cannot destructor free Unmanaged resources? Imagine if we do not have Dispose or Finalizer?

6. Destructor - Last method to be called by GC.



Conclusion - Have Dispose and Destructor both but not the Finalizer? Any specific time when to use Finalizer? Ofcourse when no Dispose is there, but other than that?