Yesterday i m working on Url column of a list. My code has to read the Url value rather than Url.
and i wrote code simply like below.
foreach(Splistitem item in Allitems)
{
string urlvalue= item["Link"].tostring();
.......
}
as link is my column and item is splist item.
The above urlvalue is giving a url value which is converted to string.
to solve this i used SpFieldUrlValue.
SPFieldUrlValue linkField = new SPFieldUrlValue(item["Link"].tostring());
string linkname = linkField.Description;
Cheers i got the value finally.
About Me
I am a Software Engineer presently working in Microsoft as vendor.The main aim of this blog is to Share my knowledge in Sharepoint,AZURE and Silverlight.
Thursday, 10 July 2008
Subscribe to:
Post Comments (Atom)
1 comment:
Post a Comment