Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to change of item url in sharepoint 2010 document librar
Rahul Khanna
Dec 22 2013 9:19 AM
1.9k
Reply
Hi,
I am working on changing the item url of
sharepoint
2010 document library programatically. Once user click on a document in the library the document should redirect to the NewItemURL, for this I have written the below code but its not giving the expected result. Could somebody please help me out on this.
string oldItemURL = item.Web.Url + "/" + item.File.Url;
string NewItemURL = "/Sites/MyTestSite/_layouts/MyCustomApplicationPage/MyCustomApplicationPage.aspx?ItemId=" + docID;
item.Url.Replace(oldItemURL, NewItemURL);
item.Update();
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Need help in custom application page and Javascript.
SharePoint Lookup column