Hi,
If you are a beginner in asp.net I wonder what you are trying to achieve by this.
If you are trying to build a tool where you would paste code snippets and see if they work - something like a quick test - there are tools in the market already for this. Such as
linqpad/[
^]
dotnetfiddle/[
^]
csharppad[
^]
Snippet Compiler/[
^]
And a host of others listed
here[
^]
However, if you are still interested in going ahead with what you are planning, then please be prepared to be overwhelmed a bit and go through
this article[
^], pretty comprehensive.
[Please accept/up-vote answers or solutions that work for you to encourage participation]