Partial postback and update panel problem

i have one label out of update panel and one button inside update panel. in button click event i update the label text. when i run the code and click on button then partial postback occur and button click event fire but label value is not change. if i put the label too in the update panel then label value change at the time of button click. i do not understand why label value is not getting updated. suppose if i want that label should stay out of update panel and label value should change at the time of partial postback then how to write the code. i dont want put the label in any update panel. please guide me with small sample working code.

thanks

Answers


As far as I know, it is the controls that you want to update asynchronously - in your example the label - which need to be put into the UpdatePanel. The Button control is the one that you don't need to put into the UpdatePanel, because you can use a Trigger element nested inside the UpdatePanel to specify what control will trigger the asynchronous postback for this UpdatePanel.

So, in short, you have to put the label inside the UpdatePanel.

You can read more about the UpdatePanel on the MSDN page for it.


Need Your Help

Show a second dropdown based on previous dropdown .in Code igniter

php jquery css ajax codeigniter

I have two dropdown boxes, actually I have done this functionality by using jquery and ajax by calling an id that if I select one thing it will appear on second select box but the main problem I am

List of Strings to Links

c# .net winforms hyperlink textbox

i was wondering if it is possible in c# to set to a text box a list of strings that are clickable links? at the moment i can set the text box like this

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.