Click here to Skip to main content
15,895,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I m developing a web application for accounting. I need to load the values to combo box from DB when check box checked. But when Check box checked page should not reload. I tried several time with ajax update panel. But it was not success.
I dont know the correct way of using ajax update panel control.
Please guide me. Top urgent.

'Belove is the Check box event what i wan to call
VB
Protected Sub ChkWHTBand_CheckedChanged(sender As Object, e As EventArgs) Handles ChkWHTBand.CheckedChanged
    GetTaxMaster()
End Sub


web page coding for specific event

XML
<td class="auto-style48">
                               <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                   <ContentTemplate>
                                       <table class="auto-style42">
                                           <tr>
                                               <td>
                                                   <asp:CheckBox ID="ChkWHTBand" runat="server" Text="Is WHT Applicable" OnCheckedChanged="ChkWHTBand_CheckedChanged" />
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                   <asp:DropDownList ID="ddTaxWHTPicker" runat="server" Font-Names="Tahoma" Height="22px" Width="150px" onclick="ddTaxWHTPicker_SelectedIndexChanged">
                                                   </asp:DropDownList>
                                               </td>
                                           </tr>
                                       </table>
                                   </ContentTemplate>
                               </asp:UpdatePanel>
                           </td>
Posted
Updated 8-Oct-14 21:34pm
v2
Comments
[no name] 9-Oct-14 3:20am    
can u share your code in above post.
Ashok Pathirana 9-Oct-14 3:35am    
Done, It is improved now. But i dont think this is correct way of doing this. I want to get know the correct way of doing this.
[no name] 9-Oct-14 3:39am    
have you added postbacktrigger in update panel
Ashok Pathirana 9-Oct-14 3:54am    
yes when i remove Postback its not working
[no name] 9-Oct-14 4:13am    
If you are using UpdatePanel page will not refresh or reload at the time of postback.

Without update panel page will get refresh at the postback event

Set ScriptManager.EnablePartialRendering =true
 
Share this answer
 
Comments
Ashok Pathirana 9-Oct-14 4:32am    
ScriptManager Partial rendering already true
Arora_Ankit 9-Oct-14 6:44am    
what is the exact issue that you are facing? are you getting full postback?
I used you code and it worked fine for me.
I found it my self. Ispostback=true

Thanks Everyone
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900