Author: saburius | Posted on: 11/20/2009 3:12:05 PM | Views : 333

Hi, I have the following syntax which does not work on the line commented below. Can some one tell me how to fix it?
protected override void Render(HtmlTextWriter writer) { string controlpath = "~/pages/controls/page.ascx"; Control controltoload = LoadControl(controlpath); //string builder for page output StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter hw = new HtmlTextWriter(sw); base.Render(hw); sb.Replace("[$uc:mycontrol$]", RenderControl(controltoload)); //has invalid arguments - syntax incorrect here //Output replacements writer.Write(sb.ToString()); }


...

Go to the complete details ...