Popular Posts
Convert relative url to absolute Uri baseUri = new Uri("http://www.domain.com/path/sample"); Uri absoluteUri = new Uri(baseUri, "../../other/path"); Uri... jQuery serialize form to json $.fn.serializeObject = function() {     var o = {};     var a = this.serializeArray();     $.each(a, function() {         if (o[this.name]) ... Dynamic load class & invoke method import java.io.FileInputStream; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.URL; import java.net.URLCla...
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>"
            });
        }
    }
}