You didn't indicate what not working in the post. Look like the Page_PreRender did not get trigger. Couple of thing you do. I think #1 should do the trick based on your scenario.
1. Change the AutoEventWireup="false" to AutoEventWireup="true"
2. Leave the AutoEventWireup="false" and change the method
Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As EventArgs)
End Sub
TO
Protected Overrides Sub OnPreRender(e As EventArgs)
MyBase.OnPreRender(e)
End Sub
asp.net - OnPreRender vs Page_PreRender - Stack Overflow[
^]