1

以下がサーバー上で実行されない理由についての説明を探していました

<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title></title>
    <link href="<%=CurrentUser.ses.style.css%>" type="text/css" rel="stylesheet">
</head>

しかし、以下は問題なく実行されます

<link href="<%=CurrentUser.ses.style.css%>" type=text/css rel="stylesheet">

(欠落している「」に注意してください)

私も試してみました

<link href="<%=CurrentUser.ses.style.css%>" type="<%=Response.ContentType = "text/css" %>" rel="stylesheet">

しかし、それはページの contenttype を変更し、すべてを css として提供します。

私は何を間違っていますか?

4

1 に答える 1

1

これを試して ?

<link href="<%= String.Format("{0}",CurrentUser.ses.style.css)%>" type="text/css" rel="stylesheet">
于 2013-05-14T08:32:34.600 に答える