Sharepoint 2007:通过 Web 服务插入带有超链接字段的列表项

发布于 2024-08-09 05:05:22 字数 257 浏览 2 评论 0原文

我需要知道如何使用 oob Web 服务插入带有超链接字段的列表项。

我已经有了执行插入的代码,只是不确定超链接。

这是一个标准文本字段(只是代码的一部分):

+ @"<Field Name=""Annotation"">" + this.messageEnvelope.DM.Annotation + "</Field>"

现在如何插入超链接,绝对没有关于此的文档。提前致谢

I need to know how to insert a list item with a hyperlink field using the oob web services.

I already have the code to do the insert, just not sure about the hyperlink.

Here is a standard text field (just part of the code):

+ @"<Field Name=""Annotation"">" + this.messageEnvelope.DM.Annotation + "</Field>"

Now how can I insert a hyperlink , there is absolutely no documentation on this. Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浊酒尽余欢 2024-08-16 05:05:22

SharePoint 以这种格式存储其链接(请注意 URL 和描述之间的逗号和空格):

网址、描述
http://example.com,示例

我不确定网络服务,但它应该可以正常工作相同的。

在代码中,您可以使用 SPFieldUrlValue 类来设置该值的格式:

SPFieldUrlValue urlVal = new SPFieldUrlValue();
urlVal.Url = "http://example.com";
urlVal.Description = "An Example";
string spUrlFormat = urlVal.ToString();

SharePoint stores its links in this format (note the comma and space between the URL and the description):

url, description
http://example.com, An Example

I'm not sure about the web service, but it should work just the same.

From code, you can use the SPFieldUrlValue class to format this value:

SPFieldUrlValue urlVal = new SPFieldUrlValue();
urlVal.Url = "http://example.com";
urlVal.Description = "An Example";
string spUrlFormat = urlVal.ToString();
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文