Text Box options for C#/ASP.Net

I need a Rich Text Box but C#/ASP.net doesn't support them

Page 1 of 1

3 Replies - 6725 Views - Last Post: 23 April 2010 - 02:46 AM Rate Topic: -----

#1 Guest_Danyiell*


Reputation:

Text Box options for C#/ASP.Net

Posted 21 April 2010 - 09:05 PM

I am currently writing an application for my children. The idea of the application is to have 8 dropboxlists which are bound to a word database. Each dropbox represents a list of a "type" of word and each type is in a different color. For instance the first drop box is for nouns and the nouns are in purple. When a word is selected in a dropbox I would like it to be added to a textbox in the same color as the word type they chose. I also need it to change the first letter of any word following a period to a Capital letter.

I started out with a regular textbox forgetting, of course, that it doesn't allow a word to be a specific color but rather all words stay the same color. I had it working but then realized I really needed the colors for my idea to work.

So I decided I needed a richtextbox but this type of control is not supported on c#/ASP.Net applications unless you get a WYSIWYG editor, which I did. I got tinymce. The problem is that I don't know javascript at all. I have looked through but cannot figure out how to add a selected item from a C#/ASP.Net code-behind to a textbox transformed into a richtext box in Javascript. I do have a richtextbox where my regular text box used to be but I have the following problems:

The text box is in the middle of the page and not where I set the position to be. I cannot change it no matter how many times I have changed the top, left, width, height px.

Every time a dropdownlist word is selected the word is posted on the richtextbox but they are not going across the page like you are writing it but rather are listing the words one on top of another.

I have set the color to change with each selection but instead it flashes the word the set color and then changes it to black again.

My questions are these: Does anyone have any idea around the WYSIWG editor? Is there another control that I could be using that wouldn't cause so much trouble. Am I missing something here?...Besides knowledge in Javascript. :)

Thank you for your time!

If you want to see the code I would be happy to provide it. I just don't really want to get into the code. I just want suggestions on how to proceed. Thanks again.

Is This A Good Question/Topic? 0

Replies To: Text Box options for C#/ASP.Net

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6245
  • View blog
  • Posts: 24,013
  • Joined: 23-August 08

Re: Text Box options for C#/ASP.Net

Posted 22 April 2010 - 04:54 AM

Moved to ASP.NET
Was This Post Helpful? 0
  • +
  • -

#3 cpuguru07  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 33
  • Joined: 21-February 09

Re: Text Box options for C#/ASP.Net

Posted 22 April 2010 - 11:36 PM

From how you described your project, ss there a reason you have to use some sort of text-input control (WYSIWYG or text box) and instead could not use labels or a literal?

I would either dynamically add labels to the page (set the color of each individual label based on the type of word selected) or use a literal and set the literal.text property as follows:
literal.text += @"<span style="color: blue;">word</span>";


Was This Post Helpful? 0
  • +
  • -

#4 mylifeishz  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 34
  • Joined: 20-May 08

Re: Text Box options for C#/ASP.Net

Posted 23 April 2010 - 02:46 AM

Thanks for responding.

I have to have some kind of text box because in addition to the information I gave before I would like for the kids to be able to type in the words they already know. I was only giving that part of the description before in an effort to save some time in not giving explanations you didn't need. I apologize for that.

I have the entire project ready to go in just a regular text box, but even if I could deal with the no color thing, I need to be able to capitalize the dropdownlist selected item when it is the beginning of a sentence. This is driving me crazy. I have been looking at tinymce all day and I do not understand how I am supposed to use it for this project. I am a little frustrated.

Anyway, thanks for your reply. I really did appreciate it!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1