I doing a bit of guessing here but I think you really meant to say you want to have code in text form inside the database and then include that code in your aspx page by placing it inside <%; %> tags.
Given the above assumption holds true I can tell you that: Yes it can be done, but it comes at a cost. Every time you wanted to change the inserted code on an aspx page you would have to run another page that initiates the changes by rewriting the content of the aspx file and after the rewrite you could redirect to that page and that is where the pain begins:
ASP.NET realizes that a change has been made to the file and needs to recompile it which takes some time. This can be tolerable if the changes are seldom even though it still is a scenario I'd rather not think about. You can clearly forget about it if the code changes are due on every page request.
Please consider using this library though:
FLEE Fast Lightweight Expression Evaluator[
^]. This fantastic library lets you compile expressions on the fly and then call them dynamically. Since the source code for the expressions is plain text you can keep them in your database and load them dynamically to compile and execute. For performance reasons you should consider some kind of caching for the compiled bits though as this process also introduces some overhead. The best part is of course that it executes as fast as normally compiled code.
I hope this was helpful to you. If you have any questions leave me a comment.
Best Regards,
Manfred