Do I have to compile code if I am changing the content of my aspx.cs file?

Yes if you have used Codebehind="my.aspx.cs". Not if you used src="my.aspx.cs" in your page declaration.