Click here to Skip to main content
15,902,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Could you pls suggest the vb version of the following C# code:

C#
if (HttpContext.Current.Request.IsSecureConnection.Equals(false) && HttpContext.Current.Request.IsLocal.Equals(false))
   {
    Response.Redirect("https://" + Request.ServerVariables["HTTP_HOST"]
+   HttpContext.Current.Request.RawUrl);
   }


Thanks in advance
Atul
Posted

1 solution

Hi Atul,


Following is your converted code for VB:-


VB
If HttpContext.Current.Request.IsSecureConnection.Equals(False) AndAlso HttpContext.Current.Request.IsLocal.Equals(False) Then
    Response.Redirect("https://" + Request.ServerVariables("HTTP_HOST") + HttpContext.Current.Request.RawUrl)
End If


To convert more codes use below link:-
http://converter.telerik.com/[^]

Thanks,
Mukesh
 
Share this answer
 
v2
Comments
Mukesh Pr@sad 2-Dec-14 4:26am    
please accept answer if u found it useful.
atul sharma 5126 2-Dec-14 4:34am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900