Saturday, March 24, 2012

My UpdatePanel does not work

Hi,

I am trying to use Updatepanel, but it does not work. The whole page is refresh it. What am doing wrong??

That is the code : (am using a master page)

<asp:ContentID="Content1"ContentPlaceHolderID="ContentPlaceHolder2"Runat="Server">

<asp:ScriptManagerID="ScriptManager1"runat="server"EnablePartialRendering="true">

</asp:ScriptManager>

<tablestyle="width: 600px;"id="TABLE1"align="center">

...............................................................

<asp:UpdatePanelID="UpdatePanel1"runat="server">

<ContentTemplate>

<cc1:MaskedEditExtenderID="MaskedEditExtender1"TargetControlID="tbCuentaBancaria"Mask="9{4}-9{4}-9{2}-9{10}"runat="server">

</cc1:MaskedEditExtender>

<tr><tdcolspan="4">

<asp:CheckBoxID="cbCuentaBancaria"runat="server"Text="No tengo cuenta bancaria"OnCheckedChanged="cbCuentaBancaria_CheckedChanged"AutoPostBack="True"/></td></tr>

<trstyle="height: 35px;">

<tdstyle="width: 176px"><asp:LabelID="Label4"runat="server"Text="Entidad Bancaria*"Width="110px"></asp:Label></td>

<tdstyle="width: 393px"><asp:TextBoxID="tbNombreBanco"runat="server"></asp:TextBox></td>

<td><asp:LabelID="Label5"runat="server"Text="Cuenta Bancaria*"></asp:Label></td>

<td><asp:TextBoxID="tbCuentaBancaria"runat="server"></asp:TextBox></td>

</tr>

</ContentTemplate>

</asp:UpdatePanel>

..............................

</asp:Content>

To useUpdatePanel controls with master pages, you can put aScriptManager control on the master page. In this scenario, the master page provides aScriptManager control for every content page.

Check UpdateMode property of UpdatePanel, whether it is set to "Conditional" or not ?

See for more details...

http://ajax.asp.net/docs/tutorials/UsingUpdatePanelMasterPages.aspx


Thanks,

I moved the ScripManager to the Master Page but nothing happen. I have modified a little the code inside the UpdatePanel and now is working. i think it was a problems with the tr and td structure.

No comments:

Post a Comment