OP:
i am creating a window application in asp.net
You can't.
Frankly speaking, I did not read the rest of the question after this line. You should seriously consider going through the basics before putting yourself for developing an applications.
Do you really know that there is a whole
difference [
^]between windows and ASP.Net applications?