try { //if related

try { //if related articles exist ? int i; for (i = 0; i < MAX_RELATED_ARTICLES && !string.IsNullOrEmpty((FindControl("txtRelated" + (i + 1).ToString()) as System.Web.UI.WebControls.TextBox).Text); i++) ; //if related articles exist and the postion of related articles is empty. if (i < MAX_RELATED_

try

{

//if related articles exist ?

int i;

for (i = 0; i < MAX_RELATED_ARTICLES && !string.IsNullOrEmpty((FindControl("txtRelated" + (i + 1).ToString()) as System.Web.UI.WebControls.TextBox).Text); i++) ;

//if related articles exist and the postion of related articles is empty.

if (i < MAX_RELATED_ARTICLES && string.IsNullOrEmpty(txtBeforeParagraphRelated.Text))

{

reqfBeforeParagraphGallery.Enabled =

true;

PopBox.Attributes.Add(

"class", "PopBoxError");

lblAllert.Text =

"Required field Related Articles - 'Before Paragraph' is missing.";

ClientScript.RegisterStartupScript(

this.GetType(), "key", "launchModal();", true);

return;

}

}

catch (Exception ex)

{

}