We are publishing our website using VS10

1) While publishing the website Localy, only aspx files are grouped together in the published folder and that web is working fine in the local `IIS server`.

2)though .cs files are not in the published folder all the events are working well in Local iis server

3)what I am doing..... I am coping that published web folder and uploaded it to the web server.

4)but now it showing an error for every event I calling????

5) how can I tackle this problem?? 

6) For security reason I don't want to upload my code behind files to web server?? I want to hide my programing logic how can I do this ????

7) when I am uploading my web with both the .cs and aspx files it working well but I don't want to do this??