Hiding a row from a page that is passed as html file into a stringbuilder type object

ShewSitoReR

New Member
I have an html page for a preview functionality.I pass this as html into a stringbuilder type object and replace content through another page.Now I want a certain section to be hidden under a specific circumstnace.Currently that section is a row.So how can I do so?The following code in the section I want to hide:\[code\]<tr id="rowcontent" bgcolor="E96F00"><td style="font-family: Arial; font-size: 14px; font-weight: Bold; color:white;">Course Content Link</td></tr><tr><td style="font-family: calibri; font-size: 14px;">@CourseContent@<BR>&nbsp;</td></tr>\[/code\]This is how I am using the above html :\[code\]file = Server.MapPath(".") + "\\Template\\Level100_Template.htm";string input = string.Empty;if (File.Exists(file)){sr = File.OpenText(file);//input += Server.HtmlEncode(sr.ReadToEnd());input += sr.ReadToEnd();x.Append(input);sr.Close();}\[/code\]This is how I am replacing the content section:\[code\]if (dt.Rows[0]["CourseContentPath"].ToString() != string.Empty) {x.Replace ("@CourseContent@", "<A href='" +CourseContentLink + "' target=_blank onclick='window.open(this.href, this.target,'height=1000px,width=1000px'); return false>Click here</A> to find the course content"); }\[/code\]How can I hide the entire section in a particular case..
 
Back
Top