public override void ItemAdded(SPItemEventProperties properties)
        {
            if (properties.ListItem == null)
                return;
            using (DisableItemEvent disableItemEvent = new DisableItemEvent())
            {
                foreach (SPField field in properties.ListItem.Fields)
                {
                    var item = properties.ListItem;

                    if (field.TypeAsString == "LinkViewItem")
                    {
                        // Edit form full url
                        //string.Format("{0}{1}?ID={2}", item.Web.Url, item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID);

                        // Edit form relative url
                        //string.Format("{0}?ID={1}", item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID);

                        // Display form full url
                        //string url = string.Format("{0}{1}?ID={2}", item.Web.Site.RootWeb.Url, item.ParentList.DefaultDisplayFormUrl, item.ID);
                        //should use this instead: PageType=4
                        string url = string.Format("{0}/_layouts/listform.aspx?PageType=4&ListId={1}&ID={2}", item.Web.Url, item.ParentList.ID.ToString(), item.ID);

                        // Display form relative url
                        //string.Format("{0}?ID={1}", item.ParentList.Forms[PAGETYPE.PAGE_DISPLAYFORM].ServerRelativeUrl, item.ID);
                        properties.ListItem[field.Id] = url;
                        properties.ListItem.SystemUpdate();
                    }
                }
                //base.ItemAdded(properties);
            }
        }
        void btnUpdate_Click(object sender, EventArgs e)
        {
            using (DisableItemEvent disableItemEvent = new DisableItemEvent())
            {
                var currentItem = SPContext.Current.ListItem;
                if (radPaid.Checked)
                    currentItem["Paid"] = true;
                else
                    currentItem["Paid"] = false;
                currentItem.SystemUpdate();
            }

            Back();
        }