tags:

views:

32

answers:

3

Hello all,

I have an aspx page. That page in turn calls a UserControl(.ascx). I want this page (or control) to be https. Please let me know any specific conditions that are needed.

I have no idea how it can be achieved! Please send me any links or so. Thanks all. Appreciate your help :)

A: 

You can't have just a part of the page on secure, you need to put it all on HTTPS.

CyberDude
A: 

User controls are parsed on the server as part of the current request. There should be no need to worry whether the request was SSL unless your user control contains absolute links that are non-SSL.

This, of course, implies that users access the ASPX via HTTPS.
A: 

just link to your page with https://yourdomain/yourpage.aspx simple as that.

Its an all or none thing. Everything on your ASPX page including your controls will be encrypted with SSL.

You will need to make sure you are using relative path links on all links inside user controls otherwise if you have hard coded http:// links then they will not be secure.

Jonathan S.
using relative path links on all links inside user controls??? This did not get into my mind.. Can you please elaborate??
Ram
if you are using ASP.net controls, any URL that begins with ~/ will render out to the root of your webapp. Even if you put your usercontrols in folders like usercontrols/signup if you use an asp.net link and src= "~/signup.aspx" it will render out to point to http://yourdomain/signup.aspx or https://yourdomain/signup.aspx if thats what the user typed into the browser.
Jonathan S.