I've got a self contained aspx
script that now needs a small class for one function. Is there any way to declare a class in the code of this page without adding a code behind (aspx.cs
) file?
I'd like to keep everything in one single file for neatness sake.
I'd like to keep everything in one single file for neatness sake.
I fail to see how mixing code and markup could ever be neat. That being said, you could add the class inside of a<script>
block, e.g: -The most straightforward way is something like this:
Yes, they are called Embedded Code Blocks, like this: