hi,
I have a table like below
http://upload7.ir/imgs/2014-04/77396220020504780439.jpg
and I save PropertyTypeID chosen by user in other table. (I save last child id)
but I have to show title of all levels in a page.
so I decided fech this titles in a recursive way
so I wrote this code
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetLevelsByLastLevelID(48);
}
}
static int parentID = 0;
static string Title = "";
static List<string> Level = new List<string>();
public List<string> GetLevelsByLastLevelID(int PropertyTypeID)
{
string ConnString = ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString;
string SqlString = "select ParentI ...
Go to the complete details ...