hello ive only started using ajax for first time today . i am trying to use an update panel in asp.net but my whole page keeps refresh rather than just the content area. can any one help.
[code=asp]<asp:Panel id="pnlQA" runat="server">
<asp:UpdateProg ress ID="upcQuestion naire" runat="server">
<ProgressTempla te>
<div>
<img src="images/indicator.gif" alt="" />
Updating...
</div>
</ProgressTemplat e>
</asp:UpdateProgr ess>
<asp:UpdatePane l ID="upPanel" runat="server">
<ContentTemplat e>
<br />
<asp:table ID="tblChoice" runat="server" Width="100%">
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" HorizontalAlign ="center" Height="50px">< b><asp:Label ID="lblIntro" runat="server" ></asp:Label></b></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" HorizontalAlign ="center" Height="50px">< span style="color:Re d;"><b>Questi on <asp:Label ID="lblPageCoun t" Text="1" runat="server"> </asp:Label> of <asp:Label ID="lblQuestion Count" runat="server"> </asp:Label></b></span></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2"> <b>Question: </b><asp:Label ID="lblQuestion " runat="server" ></asp:Label><asp: Label ID="lblDisplayO rder" runat="server" Visible="false" ></asp:Label><br /><br /></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2"> &nb sp;<asp:Require dFieldValidator ID="RequiredFie ldValidator1" runat="server" ControlToValida te="radAnswers " ErrorMessage="* Pleae choose one option" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCell> <img src="Images/Spacer.gif" width="20px" alt="" /></asp:TableCell>
<asp:TableCell> <asp:RadioButto nList ID="radAnswers " runat="server" CssClass="PollO ptions" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow>< asp:TableCell>< br /></asp:TableCell></asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" Height="50px">< b>Comment:</b> <br /><asp:TextBox ID="txtComment " runat="server" Width="75%" TextMode="Multi Line" Height="100px"> </asp:TextBox></asp:TableCell>
</asp:TableRow>
</asp:table>
</ContentTemplate >
<Triggers >
<asp:AsyncPostB ackTrigger ControlID="cmdS ubmit" EventName="clic k" />
</Triggers>
</asp:UpdatePanel >
<img src="images/spacer.gif" alt="" width="150px" height="1px"/><asp:imagebutt on ID="cmdSubmit" runat="server" AlternateText=" Next" ImageUrl="Image s/next.gif" />
</asp:Panel>[/code]
[code=asp]<asp:Panel id="pnlQA" runat="server">
<asp:UpdateProg ress ID="upcQuestion naire" runat="server">
<ProgressTempla te>
<div>
<img src="images/indicator.gif" alt="" />
Updating...
</div>
</ProgressTemplat e>
</asp:UpdateProgr ess>
<asp:UpdatePane l ID="upPanel" runat="server">
<ContentTemplat e>
<br />
<asp:table ID="tblChoice" runat="server" Width="100%">
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" HorizontalAlign ="center" Height="50px">< b><asp:Label ID="lblIntro" runat="server" ></asp:Label></b></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" HorizontalAlign ="center" Height="50px">< span style="color:Re d;"><b>Questi on <asp:Label ID="lblPageCoun t" Text="1" runat="server"> </asp:Label> of <asp:Label ID="lblQuestion Count" runat="server"> </asp:Label></b></span></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2"> <b>Question: </b><asp:Label ID="lblQuestion " runat="server" ></asp:Label><asp: Label ID="lblDisplayO rder" runat="server" Visible="false" ></asp:Label><br /><br /></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2"> &nb sp;<asp:Require dFieldValidator ID="RequiredFie ldValidator1" runat="server" ControlToValida te="radAnswers " ErrorMessage="* Pleae choose one option" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow >
<asp:TableCell> <img src="Images/Spacer.gif" width="20px" alt="" /></asp:TableCell>
<asp:TableCell> <asp:RadioButto nList ID="radAnswers " runat="server" CssClass="PollO ptions" /></asp:TableCell>
</asp:TableRow>
<asp:TableRow>< asp:TableCell>< br /></asp:TableCell></asp:TableRow>
<asp:TableRow >
<asp:TableCel l ColumnSpan="2" Height="50px">< b>Comment:</b> <br /><asp:TextBox ID="txtComment " runat="server" Width="75%" TextMode="Multi Line" Height="100px"> </asp:TextBox></asp:TableCell>
</asp:TableRow>
</asp:table>
</ContentTemplate >
<Triggers >
<asp:AsyncPostB ackTrigger ControlID="cmdS ubmit" EventName="clic k" />
</Triggers>
</asp:UpdatePanel >
<img src="images/spacer.gif" alt="" width="150px" height="1px"/><asp:imagebutt on ID="cmdSubmit" runat="server" AlternateText=" Next" ImageUrl="Image s/next.gif" />
</asp:Panel>[/code]