Tag Info

Hot answers tagged

1

Try this in the view on the Eleve row: <td>@(new SPFieldLookupValue(item["Eleve"].ToString()).LookupValue</td> This should cast the item to a LookupValue, from witch you extract the value. Or if you can not access SPFieldLookupValue class, you could make .ToString() on the item column and then parse out the value from the resulting string.


1

After much debugging, found that I had assigned credentials outside this code block. For some reason, it did not throw an error for invalid credentials, even though it was trying to execute a query without the valid username and password. Throwing a null reference exception threw me off. Here's the code if it helps anybody: myCred.UserName = ...



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