积极答复者
symbol '<%=%>' in userctrol caused asp.net page chaos of format

问题
-
code and senario as follows,
There is a placeholder named placeForm in Page,
protected void Page_Load(object sender, EventArgs e)
{Control ctrl = LoadControl(ucPath);//take '~/ProcessForm/xxx.ascx'
ctrl.ID = "processForm";
placeForm.Controls.Add(ctrl);}
question:
when I place a <%=UserID%> in the xxx.ascx, the format of this page will be destroyed, if I deleted this sign ,it would work well.How can I make symbol of <%=UserID%> works well in previous code section.Thanks first.
全部回复
-
to KeFang Chen :不是乱麻,是格式混乱。生成的html有差异。导致视觉差异。