asp:TabContainer 部署后未设置样式,然后自行修复?

发布于 2024-12-07 05:38:03 字数 608 浏览 0 评论 0原文

我在表单上有一个 asp:TabContainer,在将应用程序重新部署到服务器后,选项卡没有样式。如果我获取 Webresource.axd URL 并尝试在浏览器中加载它,我会重定向到登录页面,因此这似乎是一个身份验证问题,但应用程序的其余部分早在您访问之前就已经登录了带有选项卡控件的页面。

重新启动 Web 服务器甚至重新启动似乎都不会影响它。

然后,最终这些样式开始工作,并且不会停止工作,直到另一个部署,此时它通常表现出相同的行为。

是否存在某种缓存或权限问题?

无样式选项卡

有样式选项卡

这是来自 web.config 的身份验证:

<authentication mode="Forms">
    <forms name=".ASPXAUTH" protection="All" timeout="2400" loginUrl="Default.htm"/>
</authentication>

I have an asp:TabContainer on a form and after the app is re-deployed to the server, the tabs aren't styled. If I take the Webresource.axd URL and try to load it in the browser, I get a redirect to a login page, so it seems like an authentication problem, yet the rest of the app has already been logged in long before you get to the page with the tab control.

A restart of the web server and even a reboot don't appear to affect it.

Then, eventually the styles start working and do not stop working until another deployment, when it usually exhibits the same behavior.

Is there some kind of caching or permissions issue going on?

Unstyled tabs

Styled tabs

Here's the authentication from the web.config:

<authentication mode="Forms">
    <forms name=".ASPXAUTH" protection="All" timeout="2400" loginUrl="Default.htm"/>
</authentication>

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

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

发布评论

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

评论(2

太阳哥哥 2024-12-14 05:38:03

问题是保护级别(全部)。使其 CSS 文件可用于非受保护的页面。

<location path="cssname.css">
    <system.web>
      <authorization>
         <allow users="*"/>
       </authorization>
     </system.web>
</location>

了解有关 在 web.config 中设置特定页面或文件夹的授权规则

The Problem is protection level(ALL). Make it CSS files are available to non protected pages.

<location path="cssname.css">
    <system.web>
      <authorization>
         <allow users="*"/>
       </authorization>
     </system.web>
</location>

Learn More about Setting authorization rules for a particular page or folder in web.config

吃颗糖壮壮胆 2024-12-14 05:38:03

如果您更改了选项卡容器的 cssclass,它将如下所示。如果您想完全更改选项卡容器的外观,您必须包含选项卡容器的整个 css

.tab
{
    margin:5px 0px 5px 0px;    
}

.tab .ajax__tab_header
{
    font-family: arial,helvetica,clean,sans-serif;
    font-size: small;
    border-bottom: solid 5px #00B3B2;
    padding-left: 50px;
}
.tab .ajax__tab_header .ajax__tab_outer
{
    background: url(../Images/sprite.png) #d8d8d8 repeat-x;
    margin: 0px 0.16em 0px 0px;
    padding: 1px 0px 1px 0px;
    vertical-align: bottom;
    border: solid 1px #a3a3a3;
    border-bottom-width: 0px;
    border-radius: 5px 5px 0px 0px;
}
.tab .ajax__tab_header .ajax__tab_tab
{
    color: #000;
    padding: 0.35em 0.75em;
    margin-right: 0.01em;
}
.tab .ajax__tab_hover .ajax__tab_outer
{
    background: url(../Images/sprite.png) #bfdaff repeat-x left -1300px;
    cursor: pointer;
}
.tab .ajax__tab_active .ajax__tab_tab
{
    color: #fff;
}
.tab .ajax__tab_active .ajax__tab_outer
{
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBVCjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/wfZNwBBAakPAWukQEJUu1RGVLt9su4yo9eJ3t0FrDWyTg58HezlujFPE9lXAQ8BdQM93R9LtM2ve/vnB22tcF/DaTpItJwHKVWcBk4BLwlw1/nAUvAGm30u0udPq+QAAAABJRU5ErkJggg==") #00B3B2 repeat-x left -100px;
}
.tab .ajax__tab_body
{
    font-family: verdana,tahoma,helvetica;
    font-size: 10pt;
    padding: 0.25em 0.5em;
    border: solid 1px #00B3B2;
    border-bottom:0px;
    border-right:0px;
    border-top-width: 0px;
}

,现在只需包含选项卡容器的 cssclass

if u have changes the cssclass of the tab container, it will look like this.. if u want to completely change the look of tabcontainer u have to include the entire css of the tab container

.tab
{
    margin:5px 0px 5px 0px;    
}

.tab .ajax__tab_header
{
    font-family: arial,helvetica,clean,sans-serif;
    font-size: small;
    border-bottom: solid 5px #00B3B2;
    padding-left: 50px;
}
.tab .ajax__tab_header .ajax__tab_outer
{
    background: url(../Images/sprite.png) #d8d8d8 repeat-x;
    margin: 0px 0.16em 0px 0px;
    padding: 1px 0px 1px 0px;
    vertical-align: bottom;
    border: solid 1px #a3a3a3;
    border-bottom-width: 0px;
    border-radius: 5px 5px 0px 0px;
}
.tab .ajax__tab_header .ajax__tab_tab
{
    color: #000;
    padding: 0.35em 0.75em;
    margin-right: 0.01em;
}
.tab .ajax__tab_hover .ajax__tab_outer
{
    background: url(../Images/sprite.png) #bfdaff repeat-x left -1300px;
    cursor: pointer;
}
.tab .ajax__tab_active .ajax__tab_tab
{
    color: #fff;
}
.tab .ajax__tab_active .ajax__tab_outer
{
    background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBVCjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/wfZNwBBAakPAWukQEJUu1RGVLt9su4yo9eJ3t0FrDWyTg58HezlujFPE9lXAQ8BdQM93R9LtM2ve/vnB22tcF/DaTpItJwHKVWcBk4BLwlw1/nAUvAGm30u0udPq+QAAAABJRU5ErkJggg==") #00B3B2 repeat-x left -100px;
}
.tab .ajax__tab_body
{
    font-family: verdana,tahoma,helvetica;
    font-size: 10pt;
    padding: 0.25em 0.5em;
    border: solid 1px #00B3B2;
    border-bottom:0px;
    border-right:0px;
    border-top-width: 0px;
}

now just include the cssclass for the tab container

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