asp.net - 在 ASP .NET 中访问多页项
问题描述
我在 ASP .NET 中有一个使用 MultiPage 的页面,就像这样
问题是我需要访问在第二个选项卡中找到的元素,但是当我进行搜索时,它返回 null。
它不允许我访问当前未选择的选项卡中的项目。例如,在“常规”中,如果我在“安全”中搜索元素,则搜索返回 null。
这是 MultiPage 代码(我把它放在更少的字段中,因为它们很多而且非常广泛)。
<table cellspacing="0" cellpadding="10" width="100%" border="0">
<tbody>
<tr>
<td>
<div id="clientDiv">
<mytab:TabStrip ID="tsHoriz" Style="FONT-WEIGHT: bold; FONT-SIZE: small" runat="server"
TargetID="mpHoriz">
<!-- TabStrip here -->
</mytab:TabStrip>
<mytab:MultiPage ID="mpHoriz"
Style="BORDER-TOP: 3px solid; BORDER-LEFT: 1px solid; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-RIGHT: 1px solid; BORDER-BOTTOM: 1px solid;"
class="borde" runat="server">
<mytab:PageView>
<!--Elementos Pestaña 1 General-->
<table width="100%">
<tr>
<td align="center">
<table>
<tr>
<td align="right">
<asp:Label ID="lbl_status" runat="server" CssClass="text_S10">
Status:</asp:Label>
</td>
<td colspan="2" align="left">
<asp:DropDownList ID="ddl_status" runat="server" CssClass="text_S11"
Style="width: 150px;">
<asp:ListItem Value="-1">--- Seleccione ---</asp:ListItem>
<asp:ListItem Value="A">Active</asp:ListItem>
<asp:ListItem Value="C">Cancelado</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</td>
</tr>
</table>
</mytab:PageView>
<mytab:PageView>
<!--Elementos Pestaña 2 SEGURIDAD-->
<table cellpadding="0" cellspacing="0" align="center" width="100%" bgcolor="white"
border="0" bordercolor="#cc0000" class="text_S10">
<tr>
<td valign="top" align="center">
<table class="text_S10" border="0">
<tr>
<table cellpadding="0" cellspacing="2" align="center" width="100%"
bgcolor="white" border="0" bordercolor="#cc0000"
cssclass="text_S11">
<tr id="__tr_accounts">
<table width="100%" id="__tbl_accounts"></table>
</tr>
</table>
</tr>
</table>
</td>
</tr>
</table>
</mytab:PageView>
<mytab:PageView>
<!--Elementos Pestaña 4 CONTACT-->
</mytab:PageView>
<mytab:PageView>
<!--Elementos Pestaña 5 ESPECIALES-->
</mytab:PageView>
</mytab:MultiPage>
</div>
</td>
</tr>
</tbody>
</table>
位于“常规”中的以下返回 null
document.getElementById('__tbl_accounts');
提前致谢
解决方案
推荐阅读
- php - laravel mix sass 不会改变
- python - Python - 根据这些值拟合 GEV 分布
- r - R imager isoblur:它如何计算边界?是否可以根据其公式构建神经网络?
- android - Pinterest sdk 回调类错误:无法访问 com.android.volley.Response 的响应类文件未找到
- java - 在 Spring 测试中连接 bean 期间不存在获取包
- vue.js - 动态解析 Vue 组件名称
- reactjs - 如何使用 Jest 监视类属性箭头函数
- javascript - POST auth-service.ts ionic 3 应用程序上的语法错误
- c# - 下载文件或通过 web api 方法发送 json
- php - PHPExcel setAutoSize 仅基于第 1 行