c# - how to retain a button1 clicks action with a sleep against another button2 click action without sleep -
my problem have 2 labels , 2 buttons in 2 different update panel in asp.net. update panels contains 2 buttons. when buttons clicked update corresponding label text. issue is, suppose gave delay of 5 seconds in button1_click() method, when click button1 , button2 immediately, label2 gettin updated, whereas label1 not getting updated.
can suggest i'm going wrong?
protected void button1_click2(object sender, eventargs e) { system.threading.thread.sleep(5000); label1.text = "hello"; } protected void button2_click1(object sender, eventargs e) { label2.text = "world"; }
in button click event, update update panel second label presents below:
updatepanel2.update();
Comments
Post a Comment