---
title: "RadioButton inside Update Panel causing postback"  
description: "RadioButton inside Update Panel causing postback"  
author: "Anonymous User"  
published: 2014-02-04  
updated: 2014-02-04  
canonical: https://www.mindstick.com/forum/1956/radiobutton-inside-update-panel-causing-postback  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# RadioButton inside Update Panel causing postback

I am putting the following [controls](https://www.mindstick.com/articles/66/how-to-create-controls-at-run-time-in-csharp-dot-net) inside an [update panel](https://www.mindstick.com/forum/418/is-it-possible-to-use-fileupload-control-within-the-update-panel) so that the whole page does not [refresh](https://www.mindstick.com/forum/12865/how-to-refresh-dropdownlist-but-keep-old-selected-value-json). When clicking the button, the page does not refresh but when I try to change the [radio button](https://www.mindstick.com/articles/12743/radio-button-in-android), the page refreshes and causes a full postback. Here is my code:

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="[Server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over)" EnablePartialRendering="true" />

<asp:[UpdatePanel](https://www.mindstick.com/articles/151/asp-dot-net-ajax-server-control-updateprogress-updatepanel) ID="updatePanelToggle" runat="server">

<ContentTemplate>

<asp:[RadioButton](https://www.mindstick.com/blog/233/get-checked-radiobutton-using-javascript) ID="radioOn" [AutoPostBack](https://www.mindstick.com/interview/2074/what-is-autopostback)="true" runat="server" GroupName="toggle" Text="On" OnCheckedChanged="radioOn_CheckedChanged" />

<asp:RadioButton ID="radioOff" AutoPostBack="true" runat="server" GroupName="toggle" Text="Off" OnCheckedChanged="radioOff_CheckedChanged" />

<asp:Button ID="testButton" runat="server" [OnClick](https://www.mindstick.com/forum/12718/onclick-for-hyperlink)="mybutton_click"/>

</ContentTemplate>

</asp:UpdatePanel>

## Replies

### Reply by Pravesh Singh

Hi Jeet,\

Depending on your requirement you can control post backs by adding triggers. Use AsyncPostBackTrigger when you want to [update](https://www.mindstick.com/forum/156353/what-is-hummingbird-update) only the update panel content. If you need full post back use PostBackTrigger.

<asp:UpdatePanel ID="updatePanelToggle" runat="server" UpdateMode="Conditional">

<ContentTemplate>

<asp:RadioButton ID="radioOn" AutoPostBack="true" runat="server" GroupName="toggle" Text="On" OnCheckedChanged="radioOn_CheckedChanged" />

<asp:RadioButton ID="radioOff" AutoPostBack="true" runat="server" GroupName="toggle" Text="Off" OnCheckedChanged="radioOff_CheckedChanged" />

<asp:Button ID="testButton" runat="server" OnClick="mybutton_click"/>

</ContentTemplate>

<Triggers>

<asp:AsyncPostBackTrigger ControlID="radioOn" />

<asp:AsyncPostBackTrigger ControlID="radioOff" />

<asp:PostBackTrigger ControlID="testButton" />

</Triggers>

</asp:UpdatePanel>


---

Original Source: https://www.mindstick.com/forum/1956/radiobutton-inside-update-panel-causing-postback

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
