【发布时间】:2009-09-01 16:38:03
【问题描述】:
这是我用来填充我的 DDL 的代码。当用户访问我的页面时,有时不会填充 DDl。这只发生在生产中,而不是在开发或测试中。有人对为什么会发生这种情况有任何想法吗?
<td style="width: 100%">
<asp:UpdatePanel ID="GridUpdatePanel" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SubCategory" EventName="SelectedIndexChanged" />
</Triggers>
<ContentTemplate>
<asp:DropDownList ID="SubCategory" runat="server" AutoPostBack="True" DataSourceID="SubCategoryObjectDataSource"
AppendDataBoundItems="true" OnSelectedIndexChanged="SubCategory_SelectedIndexChanged">
<asp:ListItem Value="-1" Text="- None -" />
</asp:DropDownList>
<asp:DropDownList ID="Category Type" runat="server" AutoPostBack="True" AppendDataBoundItems="true">
<asp:ListItem Value="-1" Text="- None -" />
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<asp:ObjectDataSource ID="SubCategoryObjectDataSource" runat="server" OnSelecting="SubCategoryObjectDataSource_Selecting"
SelectMethod="GetSubCategories" TypeName="Util.DDLHelper">
</asp:ObjectDataSource>
</td>
【问题讨论】:
-
你确定不是数据库问题?例如,生产中的数据库是否具有与 dev 和 test 相同的值,您在哪里检索信息以填充 DDl?
-
@ltech,你可能想看看我发的这篇文章。我相信你遇到了和我一样的问题。在 IE 中,您是否曾经中止过操作?在 FireFox 中它只是不加载吗?请参阅stackoverflow.com/questions/757758/… 并查看我自己的答案。