Popular Posts
Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement... Activate IIS GIZP compress 1. Set metabase editable for editing. 2. Add a new extension for gzip. 3. Edit the file c:\windows\system32\inetsrv\MetaBase.xml Add file... Limit input length of JTextField package swixml.sample; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; import javax.swing.JFrame; import j...
Stats
Redirect webpart in sanboxed solution
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace MyWebpart
{
    [ToolboxItemAttribute(false)]
    public class ConsentsApprover : WebPart
    {
        protected override void CreateChildControls()
        {
            Controls.Add(new Literal()
            {
                Text = @"<script type=""text/javascript"">location='your_redirect_url';</script>"
            });
        }
    }
}