I removed the VB length check since I thought I'd just use MaxHTMLLength
to check, so there actually isn't any VB code to look at. I'll give you everything I think might be relevant - tell me if there's anything else you want to see. As you can see from my SQL statement, there is more going on in the page than just saving the CuteEditor text.
-------------------
CEEntry.MaxHTMLLength = 750
...sets the limit. This is in a subroutine triggered at page load...it sets a lot of other things, so I know that's working fine. If I remove that limit, the save routine passes with a SQL Server limit of 750 characters for field UserAutoSig....
mySQL = "Update Users Set " & _
"LastUpdate = convert(datetime,'" & Now().ToString & "'), " & _
"UserFirstName = '" & Replace(TextBoxUserFirstName.Text,"'","''") & "', " & _
"UserLastName = '" & Replace(TextBoxUserLastName.Text,"'","''") & "', " & _
"UserEmail = '" & Replace(TextBoxUserEmail.Text,"'","''") & "', " & _
"UserDisplayName = '" & Replace(TextBoxUserDisplayName.Text,"'","''") & "', " & _
"UserAutoSig = '" & Replace(CEEntry.Text,"'","''") & "' " & _
" Where UserID = " & mUserID.TOString
LabelNewError.Text="CuteEdit Length = " & CEEntry.Text.Length.ToString
...was what I was using to read out the length of the CuteEditor instance. Before I found it was misrepresenting it, I was using...
If CEEntry.Text.Length > 750 Then
LabelNewError.Text="Your autosig is too long. Trim it and try again."
Exit Sub
End If
My last test gave the max reached error with an HTML window of
This is a test!! I want to be a mouse!<br>
-------------------------------------------
I would really much prefer handling the error myself, since with limits set within Cute Editor, no other routine (including logging out of my site) will run without Cute Editor blocking it, if it perceives the limit has been passed. Even abandoning the edit by navigating away from the page gives the error, which means the user has two dialog boxes to click past (the length error, plus a "you are attempting to navigate away..." to leave the page.
I'm using CuteEditor all over my site now, and with the exception of the media problem I mention in another thread, it's working great. But this has me hamstrung in new registration and profile editing...I'm tempted to just capture the SQL Server error and do it that way.