an ssl certifiacte was installed and I would like to add a fucntionalit which will detect whether or not person is coming from HTTP or HTTPS and if a person is accessing a login URL by typing in HTTP it should redirect him to HTTPS version. Please take a look at the below code. It seems that this code executes all the time and it doesn't get to other parts of the code. I added Response.Write at the bottom for testing purposes and I never get to that line, code redirects to https and a loging functionality is ignored.
oLower() != "https")
" + Page.Request.Url.AbsoluteU
//login functionality starts here