无法从代码隐藏中获取asp.net文本字段
||
我在aspx页面中有一个小表格。此表单在jQuery对话框中呈现。我在此对话框中放置了两个按钮(jQuery按钮)。由于这些不是aspx按钮,因此我必须在按下jQuery对话框按钮时手动执行回发,如下所示:
对话框:
jQuery(function () {
var dlg = $(\'#dialog_renombrar\').dialog({
autoOpen: false,
resizable: false,
modal: true,
width: 360,
buttons: {
\"Aceptar\": function () {
__doPostBack(\'rnmbrFchr\', null);
},
\"Cancelar\": function () {
$(this).dialog(\"close\");
}
}
});
表格:
<div
align=\"center\"
id=\"dialog_renombrar\"
style=\"padding: 10px 10px 10px 10px;
margin: 10px 10px 10px 10px;
width:100%;
height:100%;
display:none;
overflow:auto\">
<table
cellspacing=\"2\"
width=\"100%\"
align=\"center\">
<tr>
<td>
Documento:
</td>
<td>
<asp:TextBox
ID=\"nombre_antiguo\"
Enabled=\"false\"
style=\"width:100%;\"
runat=\"server\"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Nuevo nombre:
</td>
<td>
<cc1:SWCTextBox
ID=\"SWCTextBox3\"
MarcarObligatorio=\"true\"
style=\"width:100%; height:90%\"
runat=\"server\"></cc1:SWCTextBox>
<asp:HiddenField runat=\"server\" ID=\"itemkey\" />
</td>
</tr>
</table>
</div>
然后在执行回发的后台代码中,我无法访问文本字段。无法做到:
Request.Forms[\"SWCTextField3\"]
值和即时对象都不可见。
我需要帮助。谢谢。
没有找到相关结果
已邀请:
2 个回复
乏摩纶誊伟
剿畦缄饥小