Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
I have used updatepanel and placed two controls a textbox and a button in it and assigned all necessary properties. But when my trigger fires the page still reloads. plz help me how could I achieve the task without reloading page. just to display text in textbox on button click.
Posted
Updated 6-May-10 11:40am
v2

first use the script manager like

<script manager>
</script manager>

then use update panel and in update panel use content template like

<update panel>
<content template>

//put text box and other control here

</content template>
</update panel>


If you get your answer then please don not forget to rate/vote me...

thanks
dx-army
 
Share this answer
 
v4
Comments
shreekanthss 9-Oct-13 4:41am    
cxcx
I think whatever 'DX Roster' told is correct. If it is working then it is fine. But still your page is getting refreshed, I think you have not used "AJAX Enabled Website" while creating your project. Select "AJAX Enabled Website" while creating new project. Just try this once...
 
Share this answer
 
v2
1. If your website was not Ajax Enabled earlier, then you can still convert into one by adding necessary configurations in your web.config file. Easiest way would be to create a dummy 'Ajax enabled website' and copy the missing tags from this website into old one that you want as Ajax enabled.

2. Set EnablePartialRendering="true" in your ScriptManager.

3. You don't need to define any 'Trigger' in Update Panel for what you are trying right now.
 
Share this answer
 
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>


<asp:UpdatePanel ID="updtPnlWarErr" runat="server" RenderMode="Inline">
<ContentTemplate>
<table border="0" cellpadding="5" cellspacing="0" class="clsDisplayTable" style="width: 95%;">
<tbody>
<tr>
<td>
<asp:Label ID="lblWarning" runat="server" CssClass="clsWarning" Font-Bold="True"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="lblError" runat="server" CssClass="clsText" Font-Bold="True" ForeColor="Red"></asp:Label>
</td>
</tr>
</tbody>
</table>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnSave" />
<asp:AsyncPostBackTrigger ControlID="btnDeleteTop" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="btnCancel" EventName="Click" />
</Triggers>
</asp:UpdatePanel>

Minal Shah.
 
Share this answer
 
Open the properties of the updatepanel and in trigger options select the controls who will trigger it. you get get help from following link.
http://www.myaspweb.com/articals/updatepanel17.aspx[^]
 
Share this answer
 
Comments
Member 10623367 8-Apr-14 1:35am    
asasas
Om Prakash Barnwal 29-May-14 5:26am    
how to add more labels on each button click event...in update panel.
Dear Sandeep...

If we are using a visual Stdio 2005 Platform then we need to use "Ajax enable website" for use the ajax control tool kit .... or if we are using .net platform 3.5(2008) then we do no need to use "Ajax enable website".

and we have to follow my previous method for use ajax...




If you get the answer then please rating me..

thanks

DX-ARMY
 
Share this answer
 
v2
 
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