External CSS file

Last post 10-03-2007, 2:26 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-02-2007, 11:08 AM 33948

    External CSS file

    Good Morning.
    Here's my problem.
    I have the Cute Editor in a file named: Default.aspx and this is how it loads the file to edit into the editor

    this is the file  Default.aspx.cs
    private string appPath = "/ndCMS/admin/myhosted.com/";
    void Page_Load(object sender, System.EventArgs e)
     {
            Response.Expires = -1;
            Response.AddHeader("pragma", "no-cache");
            Response.CacheControl = "no-cache";
            Response.AddHeader("cache-control", "no-store");

            Editor1.SetSecurityImageGalleryPath(appPath);
            Editor1.UseRelativeLinks = true;
            Editor1.BaseHref = appPath;
            Editor1.AutoParseClasses = true;
            if (IsPostBack)
            {
                //Literal1.Text = "<h2>The HTML you typed is...</h2><br>";
                //Literal1.Text += Server.HtmlEncode(Editor1.Text);
            }
            else
            {
                if (Request["fileName"] != null)
                {

                    Editor1.LoadHtml(appPath + Request["fileName"]);
                }
                else
                {
                    Response.Redirect("/");
                }

            }

        }
    And the code for the Default.aspx is

     <form runat="server" >
        <asp:RadioButtonList ID="ConfigureList" runat="server" autopostback="True" RepeatDirection="Horizontal" >
            <asp:ListItem value="Full"  Selected="True">Full</asp:ListItem>
            <asp:ListItem value="Full_noform">Full_noform</asp:ListItem>
            <asp:ListItem value="Compact">Compact</asp:ListItem>
            <asp:ListItem value="Simple">Simple</asp:ListItem>
            <asp:ListItem value="Minimal">Minimal</asp:ListItem>
            <asp:ListItem value="None">None</asp:ListItem>
        </asp:RadioButtonList>
        <CE:Editor Width="100%" id="Editor1" runat="server"  OnPostBackCommand="Editor1_PostBackCommand"></CE:Editor>
    </form>

    When I try to load a file like this

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <link href="http://www.mywebserver.com/ndCMS/admin/myhosted.com/styles.css" rel="stylesheet" type="text/css" />
    <link href="http://www.mywebservercom/ndCMS/admin/myhosted.com/css/styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    .
    .
    .
    </body>
    </html>

    And here's the catch.
    Cute Editor is in a Virtual Directory called CuteEditor, and the files are in another virtual directory Called:
    ndCMS

    So when I need to edit a file called demo.html, is like this

    http://www.mywebserver.com/CuteEditor/Default.aspx?fileName=demo.html


    And when demo.html is linked with a external css in Firefox 2.0.0.7 doesn't work, a javascript error is throwed so I tried IE 6.0 and the windows gone white, and I have to kill the process becuase is using like 99.9 percent of my processor.

    I also tried absolute paths like this in the css definition like this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <link href="css/styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    .
    .
    .
    </body>
    </html>

    But nothing works. Loads the page only if the tags link are not present.

    Thanks for your help in advance.
  •  10-03-2007, 2:26 PM 33986 in reply to 33948

    Re: External CSS file

    I tried your files in this example: http://cutesoft.net/example/Edithtml.aspx
     
    It works OK there.

    Can you download the latest build and try again?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML