Html asp标记不';不能以某种形式呈现
我有一个母版页,里面有一张申请表,上面有一组问题,最后应该有0到5个问题,这取决于申请的职位。以下是Apply.Masterpage文件中的代码片段:Html asp标记不';不能以某种形式呈现,html,master-pages,umbraco,Html,Master Pages,Umbraco,我有一个母版页,里面有一张申请表,上面有一组问题,最后应该有0到5个问题,这取决于申请的职位。以下是Apply.Masterpage文件中的代码片段: <div class="row"> <label>Please specify the main 3 software languages / technologies you have worked with in the last 5 years, and at what level you would r
<div class="row">
<label>Please specify the main 3 software languages / technologies you have worked with in the last 5 years, and at what level you would rate yourself (between 1 and 5 where 1 is poor and 5 is excellent) *
<asp:TextBox ID="QuestionC" runat="server" TextMode="MultiLine" Rows="10"></asp:TextBox>
<asp:RequiredFieldValidator ID="QuestionCRequired" ControlToValidate="QuestionC"
ErrorMessage="Please provide a mobile phone number." runat="server" />
</label>
</div>
其中,问题1是Umbraco中的字段名称,“ksdgfjsdgfjsdg”是实际问题,因此它从Umbraco中选择了正确的数据,但它似乎跳过了asp标记,这很奇怪,因为上面几行的工作都很好。唯一的区别是在附加问题中使用了标记。如何使文本框显示?我试图将负责打印附加问题的代码放入macroScript中,但我现在只做了这么多 我可能完全错了,但我不确定您是否可以用这种方式动态创建asp.net文本框。这就是为什么它只会在标签标签后立即给你这些物品 我认为如果你想动态地创建它们,你必须做如下的事情
myTextBox = new TextBox();
myTextBox.ID = "txtIDGoesHere";
PanelForMyTextBox.Controls.Add(myTextBox);
但我可能误解了这个问题。没有使用我已经实现的功能,但感谢您的尝试:)
question1+ksdgfjsdgfjsdg
question2+jugkjfkhfkhg
myTextBox = new TextBox();
myTextBox.ID = "txtIDGoesHere";
PanelForMyTextBox.Controls.Add(myTextBox);