Wednesday, April 3, 2013

Redirect to SharePoint List Display Page with Particular Data Id using Custom Webpart


 protected void gvrCompleted_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "ViewItem")
            {
                GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                Label lblId = (Label)row.FindControl("lblID");
                Response.Redirect(SPContext.Current.Web.Url + "/Lists/Service%20Request/Item/displayifs.aspx?List=cd22a145%2D1a55%2D45fe%2D9d34%2D338fae0b808b&ID=" + lblId.Text + "&Source=http%3A%2F%2Fsyncgdc2068%3A5002%2FLists%2FService%2520Request%2FAllItems%2Easpx&ContentTypeId=0x01004044E3E1408A6B4BA734CD344CB08108");                                          
            }
        }

No comments:

Post a Comment