Question

I'm trying to fix a old ASPX.Net C# page using FreeTextArea.

The site own says it used to work but hasn't used it for ages.

The problem is that the FreeTextArea is just rendering as a plain textarea. There are no compilation errors. I'm also not seeing any JavaScrip errors of 404's or anything else.

I've tried to make the simples page that I could (below) and that's still just showing as a plain HTML textarea.

RTBTest.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RTBTest.aspx.cs" Inherits="RTBTest" %>
<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <FTB:FreeTextBox id="FreeTextBox1" runat="Server" />
    </div>
    </form>
</body>
</html>

RTBTest.aspx.cs:

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class RTBTest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
Était-ce utile?

La solution

Turns out that the site had been moved from a .net 1.0 host to a 2.0 .net host a long time ago and the wrong DLL for FreeTextArea was in the bin directory. This compiled fine but failed to work.

The fix was to update the DLL to the 2.0 framework version. This fixed the issue as soon as I re-compiled (recycled the application pool).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top