locked
Making User Entry for Events and News Easier RRS feed

  • Question

  • User-1682828110 posted

    As I prepare to role out the club site for our Corvette club, I needed to make Events and News entry easier for those in the club that will maintain these sections of the site.  The average user in our site would never make use of an HTML editor (or even understand the concept of adding html tages to what they enter), however they do know how to use a word processor.  Based on the logic that a typical user of a word processor would press the enter key one or more times to create new paragraphs, I've modified the News and Events view and list pages to handle the NewLine feed stored in the SQL table as follows (this is for the VB version): 

    For the list pages
    this code
    truncate(CStr(Eval("description")))
    has been replaced with this
    truncate(CStr(Replace(Eval("description").ToString(), vbNewLine, "<br>")))

    For the view pages
    this code
    Eval("description")
    has been replaced with this
    Replace(Eval("description").ToString(), vbNewLine, "<br>")

    The output is formatted as the user would expect.

    Hope this helps others make their site easier to use.....

     

    Cheers From Temple, Texas

    Sunday, August 27, 2006 10:38 AM

All replies

  • User523970105 posted

    You might also want to consider swapping out the textboxes with either FreeTextBox or FCKeditor.  I tried both, and stayed with FCKeditor.  FreeTextBox was a bit easier to incorporate, but sometimes acted a little strangely.  FCKeditor seems to operate very similarly to MS Word.

     

    Tuesday, August 29, 2006 8:14 AM
  • User1610544847 posted

    You might also want to consider swapping out the textboxes with either FreeTextBox or FCKeditor.  I tried both, and stayed with FCKeditor.  FreeTextBox was a bit easier to incorporate, but sometimes acted a little strangely.  FCKeditor seems to operate very similarly to MS Word.

     

     What do I need to change to make the box html?

    Thursday, October 19, 2006 8:38 AM
  • User706866991 posted

    I'd be interested to know how you accomplished this.  I used FreeTextBox on the Bulk Email page but get errors trying to send with marked up text (bold, etc.).  If FCKEditor works well then I need to make some changes. 

     

    Bob

    Thursday, October 19, 2006 11:08 AM
  • User523970105 posted

    Are you getting a validation error?  By default, asp.net doesn't allow HTML markup in textbox input fields to protect your site from bad guys.  If your events, news, and bulk email pages are restricted to trusted users you can turn off the validation check by adding ValidateRequest="false" at the top of the page.

     For example:

    <%@ Page Language="VB" MasterPageFile="~/Default.master" Title="Bulk Emailer" ValidateRequest="false" %>

     

    Thursday, October 19, 2006 11:24 AM
  • User706866991 posted

    No, no errors yet.  I have only put FreeTextBox on the Bulk Emailer and it gets an error that relates to security.  I posted the exact message in the Bulk Emailer Forum on the aspksolutions site.  I haven't tried fckedir yet, but am working with a small business site that has it implemented.

     

    Bob

     

    Thursday, October 19, 2006 7:09 PM
  • User523970105 posted

    I looked over at aspsksolutions and that error message looks like what I was getting before I added ValidateRequest="false" to the page directive.  Both FreeTextBox and FCKeditor need to have ValidateRequest turned off for any page where they are used (assuming that you are going to really use them to format text).

     

     

    Thursday, October 19, 2006 10:23 PM
  • User523970105 posted

    You might also want to consider swapping out the textboxes with either FreeTextBox or FCKeditor.  I tried both, and stayed with FCKeditor.  FreeTextBox was a bit easier to incorporate, but sometimes acted a little strangely.  FCKeditor seems to operate very similarly to MS Word.

     

     What do I need to change to make the box html?

    You need to replace the TextBox with a different textbox that allows HTML.  Two examples are FCKeditor at http://www.fckeditor.net and FreeTextBox at http://www.freetextbox.com.

    I like them both, but slightly prefer FCKeditor because it has some things that I want that are only available in the for-fee version of FreeTextBox.

    Thursday, October 19, 2006 10:33 PM