I think Your complete code is in update panal.
So when you are clicking on the button the page is not doing the post back.
for that you can do AsyncPostBack for button also
add This :
<asp:asyncpostbacktrigger controlid="Button4" xmlns:asp="#unknown" />