In ASP.NET There are two way of doing it. Either we can use current request to check whether it is secured or not or we can use server variables to check whether it it secure or not just like following.
Here in above code If this returns true then Page is secured otherwise it is not Or you can use following server variable to check the protocol.
So you can see its very easy to check whether page is secure or not. Hope you liked it… Stay tuned for more..