Did you ever use the DNN calender popup? It's great, it is very easy to use.
But if you are using a <textbox> which you want to add to your screen via a vb program, then you have a problem. You need to give the calender function the client controlid of the textbox. But while creating it, it is not yet exising.
So in your .Net program you define the textbox with id dynfprefv2_damagetown, but when it is rendered to the html it gets the clientid dnn_ctr637_viewmaintainclaimv2_dynfprefv2_damagetown.
Read here how to solve this