如何在 MOSS/Sharepoint 2007 中添加 Web 部件的样式表

发布于 2024-07-30 00:43:50 字数 366 浏览 2 评论 0原文

我正在将一个 Web 部件从 2003 年迁移到 2007 年。该 Web 部件最初使用修改后的核心样式表中的样式。 我现在想专门为此 Web 部件创建一个单独的样式表。

我尝试过使用,

CssRegistration.Register("/wpresources/Portal.Megamenu/mystyles.css");

但这会导致 HTTP 401,我必须登录(NTLM 已启用)。 我还有一些从同一位置成功加载的 javascript 文件。 如果我直接输入 url,我会得到 CSS 文件的 401,但不会得到 JS 文件的 401。

谁能指出我做错了什么?

谢谢

I am migrating a web part from 2003 to 2007. The web part originally used styles from a modified core style sheet. I now want to create a separate stylesheet just for this web part.

I have tried to use

CssRegistration.Register("/wpresources/Portal.Megamenu/mystyles.css");

but this results in a HTTP 401 and I have to log in (NTLM is enabled). I also have some javascript files which get successfully loaded from that same location. If I enter the url directly I get the 401 for the CSS file but not for the JS files.

Can anyone point out what I'm doing wrong?

Thanks

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

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

发布评论

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

评论(1

望喜 2024-08-06 00:43:51

可能不太可能,但是您是否检查过 mystyles.css 与 JavaScript 文件相比的文件权限?

Probably a long shot but have you checked the file permissions for mystyles.css in comparison to the JavaScript files?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文