Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    [ASPNET] Webresource css

    Salve,
    ho realizzato una libreria in vb.net, ho aggiunto dei file css come risorsa incorporata, ho registrato l'assembly del css e delle immagini, ho messo nell'url del css il web resource ed uso questi comandi per aggiungere il css

    codice:
    Dim type = manager.GetType()
                Dim cssUrl As String = manager.ClientScript.GetWebResourceUrl(type, resourceName)
    
                Dim cssLink As New HtmlLink()
                cssLink.Href = cssUrl
                cssLink.Attributes.Add("rel", "stylesheet")
                cssLink.Attributes.Add("type", "text/css")
    
                If media <> "" Then
                    cssLink.Attributes.Add("media", media)
                End If
    
                If charset <> "" Then
                    cssLink.Attributes.Add("charset", charset)
                End If
    
                manager.Header.Controls.Add(cssLink)
    dome manager è il page, ed il resourceName è il nome dell'assembly.
    Se visualizzo l'html trovo:

    codice:
    <link href="/EST4/WebResource.axd?d=lAwza_yKbjs8sTb4AfXj5OTHYQH4HXMUZQseKLAMaBb9bZRnPGXqk_i760tjXPF8qlNKrW59Ou6U7D3S-OjRVLKlwF76nXpa0YWFN-H69w3O-BvX96XvS5NgfIqq25X_KZ1LNRPBCsI7K-NJUqin8w2&amp;t=634928132839466534" rel="stylesheet" type="text/css" />
    <link href="/EST4/WebResource.axd?d=V-PQuxenj8wVvwR-C9zkG4s7thYTxf7V4BlDh5M4A67F0TCE0doWs2NjsVg2cH6jQbSep5DFzI5cNNzOeBfkTfUd7YksS-GPvW3JLoE6r9wwlj39sEt7FC7cETrY5xvkfprYYLjsYL27OvDEzKyGWp9wzvPA0soLsqUv4mbMxis1&amp;t=634928132839466534" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
    se li apro in un tab a parte visualizzo il css, ma purtoppo la pagina non renderizza gli stili. Come mai? Ho cercato ma nn riusco a trovare la soluzione.

  2. #2
    mandandolo in esecuzione con firebug ho notato che mi da il seguente errore:

    NetworkError: 404 Not Found

    quale potrebbe essere la causa?

  3. #3
    il problema a quanto pare è questo

    SEC7113: CSS ignorato a causa di una mancata corrispondenza di tipo MIME

    devo impostare qualcosa?

  4. #4
    problema risolto...il post può essere chiuso...grazie lo stesso

  5. #5
    HI
    I would like to tell you that asp net is best way to develop your web page.It Helps you in better way provide you all the thing like features, graphics,tools etc which actually helps you lot in making your site by asp net.
    Thanks.
    http://seo.synoris.com/
    <a href="http://seo.synoris.com/">seo onpage services</a>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.