Get the Field Name from a Class Data

How to Get the list of fields from a class, let say "ProposalData".
ProposalData contains public property Id, Title, and SubmissionDate. We will get those three property using System.Reflection member class called "PropertyInfo". See the example below:

public List<string> GetFieldProposalDataData()
{
List<string>listField = new List<string>();
PropertyInfo[] propertyInfos;
propertyInfos = typeof(ProposalData).GetProperties();
foreach (PropertyInfo propertyInfo in propertyInfos)
{
listField.Add(propertyInfo.Name);
}
return listField;
}

Okay, may it helps

Thread was being aborted

Such title above, is caused by Page Redirect inside try and catch methods.
That, could be solved by adding "false" parameter inside :

Response.Redirect("Page.aspx",false);

Okay, may it helps

Multiple database on Nhibernate

Multiple database is supported by Nhibernate.
Example below is using schema tag (bold) on hbm.xml file :


<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-import="true" schema="worktracking">




Schema means = Database name
But, this method only work on the same server.

Okay, may it helps