string viewUrl = list.DefaultViewUrl;
// If current user can edit the list, then we set viewUrl to the edit form
if ((list.EffectiveBasePermissions & SPBasePermissions.EditListItems) == SPBasePermissions.EditListItems)
{
viewUrl = list.DefaultEditFormUrl;
}
string editLink = @"<a href=""javascript:void(0)"" onclick=""javascript:SP.UI.ModalDialog.showModalDialog({{ url: '{0}?ID={1}', title: '{2}' }}); return false;"">{2}</A>";
string linkUrl = string.Format(editLink, viewUrl, item.ID, item.title);
No comments:
Post a Comment