Yes , We can protect source code so clients can't see it.
ASP.NET supports a mode of development called "code-behind". This enables you to partition your code into a separate file from an .ASPX page file (which contains your static html and server control declarations).
This provides two benefits:
1) Better code/content separation/organization (enabling more tool support, multi-developer support, localization support, etc).
2) Enabling you to optionally "pre-compile" the code-behind file before deployment on a server. This step provides (among other things) the ability to protect your source code from direct access by your customers.