Answered by:
Operation is no valid due to current state of object.

Question
-
I have created a web part. And in that web part I have a link which refer to a page in share point with query string.
Some thing like as :
<a href=http://sharepoint:79/codelibrary/PageName.aspx?Id=1/>
It gives the error that Operation is not valid due to current state of object.
But when I call this page with out Id=1 or without any query string, it works fine.
Please help me, where I am doing wrong.
Many Thanks
Monday, September 29, 2014 2:35 PM
Answers
-
Hi Naeem,
Thanks for posting your query, Kindly Do NOT call .Update() inside Evelvated Permission’s delegate Just do it below SPSecurity.RunWithElevatedPrivileges
Also, Check out the detail for more details in below mentioned URL
I hope this is helpful to you. If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh
- Marked as answer by Hemendra AgrawalModerator Wednesday, October 29, 2014 6:50 AM
Monday, September 29, 2014 2:44 PM -
Hello,
I don't think there is problem with security. Just take a look at here:
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked as answer by Hemendra AgrawalModerator Wednesday, October 29, 2014 6:51 AM
Tuesday, September 30, 2014 5:59 AMModerator
All replies
-
Hi Naeem,
Thanks for posting your query, Kindly Do NOT call .Update() inside Evelvated Permission’s delegate Just do it below SPSecurity.RunWithElevatedPrivileges
Also, Check out the detail for more details in below mentioned URL
I hope this is helpful to you. If this works, Please mark it as Answered.
Regards,
Dharmendra Singh (MCPD-EA | MCTS)
Blog : http://sharepoint-community.net/profile/DharmendraSingh
- Marked as answer by Hemendra AgrawalModerator Wednesday, October 29, 2014 6:50 AM
Monday, September 29, 2014 2:44 PM -
Hello,
I don't think there is problem with security. Just take a look at here:
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help- Marked as answer by Hemendra AgrawalModerator Wednesday, October 29, 2014 6:51 AM
Tuesday, September 30, 2014 5:59 AMModerator