I have a master page than contains my ScriptManager. On a child page i have an updated panel. Inside the update panel there is a dropdowlist. When i set the autopostback=true i get OutofMemory Exceptions. All the time. Please also note that I have AjaxControlToolkit set on my web.config.
Here is parts of my Code.
MasterPage.aspx
<ajax:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" ></ajax:ToolkitScriptManager>
Child Page
<asp:UpdatePanel ID="upChTime" runat="server"><ContentTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td><asp:TextBox runat="server" ID="txChTimeClientCode" /></td>
<td><asp:DropDownList runat="server" ID="dpChTimeClient" /></td>
</tr>
So when i s开发者_运维知识库et the AutoPostBack=True on the DropdownList the Visual Studio internal webserver goes to 500MB and i get a OutOfMemory Exception.
After a comment Child Page Code Behind
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
PopulateLatestClients()
End If
End Sub
Private Sub PopulateLatestClients()
dpChTimeClient.DataSource = GetLatestClients()
dpChTimeClient.DataTextField = "description"
dpChTimeClient.DataValueField = "id"
dpChTimeClient.DataBind()
dpChTimeClient.Items.Insert(0, "")
End Sub
It seem that GetLatestClients() return too much items. Have you checked that?
精彩评论