Friday, June 6, 2008

Feature Framework Code

Recursively I have to drill down all the control, one thing off course every table row, td should be tagged as runat=”server” and with proper Ids.

foreach (Control pageChildControl in Page.Controls)
{
if (pageChildControl is HtmlForm)
{
HtmlForm frmControl = (HtmlForm) pageChildControl;
frmControl.Attributes.Add(m_LinkedId, m_PageFeatureId.ToString());
formControl = pageChildControl;
break;
}
}

if (formControlCollection != null)
{
foreach (Control formChildControl in formControlCollection.Controls)
{
if (formChildControl is AsynchPanel)
{
AsynchPanel lbPanel = (AsynchPanel) formChildControl;
string parentId = ExtractControlLinkedId(lbPanel.Parent);
lbPanel.Attributes.Add(m_LinkedId, parentId);

ExtractHtmlTableControl(formChildControl);
}
else if (formChildControl is HtmlTable)
{
if (CheckFeatureExistanceInParent(formChildControl, string.Empty))
{
if (!formChildControl.Visible)
{
continue;
}
ExtractHtmlRowsFromTableControl(formChildControl);
}
}
}
I have also attached code with it which I have written .Still I am working on it due to urgent task and off course following timeline I have postponed this for some time.

No comments: