Hot answers tagged

1

URL field is mandatory in Links content type. If want to remove it from content type you won’t get the option to remove/delete. I suggest you to hide the URL field instead of removing because removing from content type will impact other links content type list. Here is the code to set hidden $web = Get-SPWeb -identity http://your/site/name $list = $web....


1

Your best bet, IMO, would be to inject a JavaScript code into the display page of the links list. That JavaScript code would grab the hyperlink value, and use it to redirect the browser. If this suits you, we can try to find the best way to 1. inject the JavaScript, 2. and implement that JS code. [EDIT] 1. Can be achieved by editing the dispform.aspx ...


1

Try this: FieldUrlValue url = new FieldUrlValue(); url.Url = "Your Url here"; url.Description = "Your description here"; oListItem["URL"] = url;


1

You can set it like this: oListItem["URL"] = String.Format("{0}, {1}", mainurl, "Description"); It's a simple string and URL value is followed by a description which are separated by a comma. Or you can use a more object oriented approach: var value = new SPFieldUrlValue(mainurl); value.Description = "Description"; oListItem["URL"] = value; Whichever ...



Only top voted, non community-wiki answers of a minimum length are eligible