Sunday, May 20, 2012

Redirection of page from http to https using VB.net and C#

Redirection of page from http to https using VB.net

If Not Request.IsSecureConnection Then
 Dim redirectUrl As String = Request.Url.ToString().Replace("http:", "https:")
 Response.Redirect(redirectUrl)
End If

Redirection of page from http to https using C#
if(!Request.IsSecureConnection)
{
  string redirectUrl = Request.Url.ToString().Replace("http:", "https:");
  Response.Redirect(redirectUrl);
}

Redirection Script for redirecting to new page

Redirection Script for Redirecting to new page.

One can use this redirection script to redirect from one page to another

<SCRIPT LANGUAGE="JavaScript">
  
 document.location.href = "<url to redirect>";
 
 </SCRIPT>

Thursday, May 3, 2012

init.js - library not registered

If you are getting a javascript error in the web browser
OR
A Java error
OR
Dropdown Menu not working in a Sharepoint 2007 site

Running IE?
Have Office 2010 64-bit installed?
If you are getting a init.js - library not registered error, try this:
Open CMD prompt, and navigate to C:\Program Files (x86)\Microsoft Office\ Office14.

Type regsvr32 name.dll  and Press Enter.
Restart IE
Done