PageRenderTime 35ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/SPALM.SharePointSoftwareFactory/Snippets/CSharp/SharePoint Software Factory 2010/ListItems/Set the value of a link field of a list item.snippet

#
Unknown | 58 lines | 58 code | 0 blank | 0 comment | 0 complexity | 022033833be33b1170b10b6d4dc009c7 MD5 | raw file
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  3. <CodeSnippet Format="1.0.0">
  4. <Header>
  5. <SnippetTypes>
  6. <SnippetType>Expansion</SnippetType>
  7. </SnippetTypes>
  8. <Title>Set the value of a link field of a list item</Title>
  9. <Author>Ayman El-Hattab http://ayman-elhattab.blogspot.com
  10. </Author>
  11. <Description>
  12. </Description>
  13. <HelpUrl>http://SPCodeSnippets.codeplex.com</HelpUrl>
  14. <Shortcut>
  15. </Shortcut>
  16. </Header>
  17. <Snippet>
  18. <Declarations>
  19. <Literal Editable="true">
  20. <ID>URL</ID>
  21. <ToolTip>URL</ToolTip>
  22. <Default>http://spsf.codeplex.com</Default>
  23. <Function>
  24. </Function>
  25. </Literal>
  26. <Literal Editable="true">
  27. <ID>DESCRIPTION</ID>
  28. <ToolTip>Description</ToolTip>
  29. <Default>SharePoint Software Factory 2010</Default>
  30. <Function>
  31. </Function>
  32. </Literal>
  33. <Object Editable="true">
  34. <ID>fieldUrl</ID>
  35. <ToolTip>SPFieldUrlValue</ToolTip>
  36. <Default>value</Default>
  37. <Function>
  38. </Function>
  39. <Type>SPFieldUrlValue</Type>
  40. </Object>
  41. <Object Editable="true">
  42. <ID>item</ID>
  43. <ToolTip>SPListItem</ToolTip>
  44. <Default>item</Default>
  45. <Function>
  46. </Function>
  47. <Type>SPListItem</Type>
  48. </Object>
  49. </Declarations>
  50. <Code Language="csharp"><![CDATA[
  51. SPFieldUrlValue $fieldUrl$ = new SPFieldUrlValue();
  52. $fieldUrl$.Description = "$DESCRIPTION$";
  53. $fieldUrl$.Url = "$URL$";
  54. $item$["$URL$"] = $fieldUrl$;
  55. ]]></Code>
  56. </Snippet>
  57. </CodeSnippet>
  58. </CodeSnippets>