我有以下代码(.Aspx.cs),
StringBuilder strMarkup = new StringBuilder();
strMarkup.AppendFormat("<div id=" + "MyDiv" + "><table id= " + "sDetails" + ">" +
"<tr><td><input id= " + "lblStudentName" + " type=" + "text" + " value = " + "StudentName" + "/> </td>" +
"<td> <input id= " + "dispStudentName" + " type=" + "text" + " value = {0}/> </td>" +
"</tr>" +
"<tr><td><input id= " + "lblCourseName" + " type=" + "text" + " value = " + "StudentName" + "/> </td>" +
"<td> <input id= " + "dispCourseName" + " type=" + "text" + " value = {1}/> </td>" +
"</tr></table></div>", _studentName, _courseName);
我想将上述内容加载到 Ajax UpdatePanel 我的 .aspx 页面如下:
<asp:UpdatePanel ID="UpdateDetails" runat="server">
<ContentTemplate>
<asp:Panel ID="StudentDetialsPanel" runat= "server">
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID = "btnSubmit" EventName="" />
</Triggers>
</asp:UpdatePanel>
提前致谢