Important alert: (current site time 7/15/2013 9:16:51 AM EDT)
 

ideas?
(If this comment was disrespectful, please report it.)

 
winzip icon

ASP .NET (VB) Rich Text Box

Email
Submitted on: 10/10/2003 5:18:43 PM
By: Dan Bertram  
Level: Advanced
User Rating: By 27 Users
Compatibility: ASP.NET
Views: 80515
 
     This is a Rich Text Box for ASP .NET. You can copy information from a word document into it and it will keep the format and save it to a database for display on the web. This is built into VB .NET but there is nothing out there for ASP .NET. After doing some searching and comming up with nothing we decided to make our own and share it with everyone. You can also format the text with the controls built into the Rich Text box. Example Bold, Underline, Change the color, center, etc.

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
10/15/2003 6:57:40 AMMihir Solanki

Really usefull Code.....

Mihir Solanki
www.aspxtoday.com
(If this comment was disrespectful, please report it.)

 
10/16/2003 8:36:37 PM

Absolutely brilliant from what I've seen so far - this is by far the most useful code I've come across on this site.

One nice to have would be to convert this into a User Control - but I might just do that myself. The full 5 from me.

PS - Calvin and Hobbs, nice!
(If this comment was disrespectful, please report it.)

 
10/25/2003 9:44:22 PMChristina McEntire

This is great - and extremely useful! Thanks for sharing!

Christina
(If this comment was disrespectful, please report it.)

 
12/6/2003 2:21:51 AMraxix

I have been looking for such RichText editor. Its great. It will be very easy if we convert this to a user control like the EasyWebEdit. If could convert it to user control I will share it here.

Thanx for sharing your knowledge.
(If this comment was disrespectful, please report it.)

 
12/6/2003 11:22:34 AMVisionsMind

The best
(If this comment was disrespectful, please report it.)

 
12/6/2003 11:25:03 AMVisionsMind

I think my previous note didn't got submitted, anyhow this is the best and very easy to use! An excellent job, keep on coming!

I will be converting it to a C# control.

Thanks
(If this comment was disrespectful, please report it.)

 
1/9/2004 12:40:27 PM

hi everyone
i have been searching on web to solve this problem and when i saw your program i was suprise but wen we run rtb.aspx i find this error
<%@ Application Codebehind="Global.asax.vb" Inherits="RTB.Global" %>
please help me my os is windows xp professional and i am beginer in .NET
THANK YOU
(If this comment was disrespectful, please report it.)

 
1/9/2004 12:52:19 PM

In reply to your problem:

it is an error in the HTML at the top of the ASPX page.

it should read:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="RTB.aspx.vb" Inherits="RTB.WebForm1"%>

not:
Codebehind="Global.asax.vb"
Inherits="RTB.Global" %>

Hope this helps.

Dan
(If this comment was disrespectful, please report it.)

 
1/10/2004 1:01:06 AM

hi
i cheked it but i was correct as you say .it say that my error source file is in line 1 of global.asax
thanks
(If this comment was disrespectful, please report it.)

 
3/17/2004 3:46:09 PM

Excellent - just what I was looking for.
- I agree this is the best ive seen so far - very simple yet very powerful and so functional.

(If this comment was disrespectful, please report it.)

 
5/12/2004 10:20:35 AMBasel Nimer

Great Work,
can you also add an "Add table" and "add row/column" to the selected table it would very very good,

another thing, if i paste a local word text with images lets say, and saved it to a database , how can i display the images? the src is pointing to the local machine, and i am viewing them from another machine, do you have any idea?

(If this comment was disrespectful, please report it.)

 
5/12/2004 10:27:46 AMDaniel Bertram

In reply to your question: how can i
display the images?

You would have to check the edit HTML box and edit the location of where you are going to upload the files to. Then upload the images to your host.

Thanks,

Dan
(If this comment was disrespectful, please report it.)

 
5/13/2004 4:25:37 AMBasel Nimer

Thanks,
Yes, i thought of that, but there is no way to upload the images without the user selecting them, no ?
I mean, because of the security restrictions of IE,

Is there a way to upload them automatically ?

Another thing, I tried to convert this to a user control, and everything worked good, but the dlgHelper, I keep getting a "dlgHelper is Undefiened" Javascript error , any Ideas?

Thanks Agaian, If this dlgHelper thing works, i'll send you the new usercontrol.

(If this comment was disrespectful, please report it.)

 
5/13/2004 9:34:23 AMBasel Nimer

it worked, i have it now as a UserControl

I am waiting to solvethe Images Issue.

(If this comment was disrespectful, please report it.)

 
5/13/2004 9:50:32 AM

You are probably going to have to add the file upload control to the page and just add the html code as stated before to the rich text box to display the file. Hope this helps.

Dan
(If this comment was disrespectful, please report it.)

 
6/17/2004 10:08:35 AM

Looks beatiful but I can't access the database because its locked and/or Im not authorized. Tried to follow instructions in redmefile but they didnt apply on my WinXP, Access XP system. How do I relink to a database outside the RTB folder for starters? Please help!!

newbie /xaphod
(If this comment was disrespectful, please report it.)

 
9/11/2004 3:23:32 AM

This is very good source code.
I used this code in my project

(If this comment was disrespectful, please report it.)

 
9/12/2004 6:54:18 PM

I decided to use this editor because it seems very powerful, but when I run RTB.aspx I received the error:
Could not load RTB.Global, in the first line of global.asax.
<%@ Application Codebehind="Global.asax.vb" Inherits="RTB.Global" %>

I did the changes mentioned above and another problem "Could not load RTB.WebForm1" comes.

Does anyone face the same problem? Please help.

Thanks.

(If this comment was disrespectful, please report it.)

 
9/17/2004 7:17:57 PM

OK, I found the problem:
Could not load RTB.WebForm1".
I just re-build the project using The Visual Studio to create the dll.
The database problem "Could not lock file." still coming. I replaced the mdb file with new one with full access for all users and still the sanme err message comes. Any one can help?

Thanks.

Ali

(If this comment was disrespectful, please report it.)

 
9/27/2004 8:32:02 AMBasit

Excellent job ...
But it will be nice if image upload option is added with the code .. if its under consideration then its good .. otherwise i m working on it .. if i finish it i will share it with all ..

again a nice effort .. thanx :)
(If this comment was disrespectful, please report it.)

 
10/6/2004 2:31:44 AM

I am trying to open this project. But i am getting the following error.

The default web access mode for this project is set to file share, but the project folder at 'http://localhost/RTB' cannot be opened with the path 'c:\inetpub\wwwroot\RTB'. The error returned was:
Unable to open Web project'RTB'.The web 'RTB' on server "http://localhost" does not exist.


Where am i going wrong?What should i do?

How to open and run the project.
Help would be grateful. Since i want to do a project implementing the formatting features.

Thanks in advance
(If this comment was disrespectful, please report it.)

 
10/27/2004 6:04:35 PM

Hi,
When i try to incorporate it into my aspx page with other controls i get a
(If this comment was disrespectful, please report it.)

 
10/27/2004 6:06:15 PM

Hi, When i try to incorporate it into my aspx page with other controls i get a A potentially dangerous Request.Form value was detected from the client (txtRTB="


(If this comment was disrespectful, please report it.)


 
11/30/2004 9:18:29 AM

Hi, I was wondering how does the textarea link to the txtRTB?
(If this comment was disrespectful, please report it.)

 
11/30/2004 9:19:46 AM

Yeah I was having this error also A potentially dangerous Request.Form value was detected from the client (txtRTB="


(If this comment was disrespectful, please report it.)


 
12/7/2004 12:06:22 AM

Hi;

Are there ways to paste the drawing objects and bitmap objects in MSWord document?
PLS advise me how to implement this capability to this RTB.
(If this comment was disrespectful, please report it.)

 
12/24/2004 5:04:13 AM

Great work buddy...
but error in dlghelper not found i am a begginer so i think i am not able to add it...
(If this comment was disrespectful, please report it.)

 
12/29/2004 5:01:15 AM

I'm very interesting in your code, but I can't dounload it from site because the link is broken or page with dounload doesn't exists. Can you send the code to me, please? Thank you very much.
my email: oksana.isaev@favoweb.com
(If this comment was disrespectful, please report it.)

 
3/31/2005 3:54:41 AM

This is excellent and brilliant
Thanks for sharing
Can you include Print option in it.
(If this comment was disrespectful, please report it.)

 
4/20/2005 9:58:52 AM

Hi I'm having the same problem that 5/13/2004 4:25:37 AM:Basel Nimer was having, when I include the RTE inside of form tags I get a Javascript error when calling the dlgHelper, I didn't see the solution posted above can anyone help with this?
(If this comment was disrespectful, please report it.)

 
4/20/2005 10:51:33 AM

Okay I feel like a fool now, ever notice how the small things you over look are exactally the things that are wrong, when the dlgHelper is called in the javascript it should have a document. in front of it in order for it to function inside of form tags. Just figured I would post this solution for anyone else who happens along this page.
(If this comment was disrespectful, please report it.)

 
5/24/2005 4:26:34 AM

Dan, Mark... beauty, guys!

To ppl who were having problems:
Put the project in the specified location. Open with VS.NET. It asks to convert to the current version (2003), so let it. Run it, but the db problem's still there. So follow the steps given. Some of you may be saying 'but I don't have the Security tab!' To fix that, go to Windows Explorer: Tool>>Folder Options>>View>>uncheck Use Simple File Sharing. The proceed with the rest of the steps and voila!

D.
(If this comment was disrespectful, please report it.)

 
9/3/2005 2:01:42 AMShawn

Getting error CS0103: The name 'DsRTB1' does not exist in the class or namespace 'ASP.RTB_aspx' Line 364: Line 365:
Line 366: Line 367: Line 368:
9/7/2005 3:43:01 PMRick

Big big thankyou!! This is possibly the most useful piece of code I have ever downloaded. I re-wrote the VB to query and update records from an sql datasource. In the past, my application required the user to manually code HTML if they wished to break the pages data formatting for a record. This is so much easier for them!

Thanks again.
(If this comment was disrespectful, please report it.)

 
11/17/2005 8:22:18 PMDavid

I am getting an could not lock file error. I saw this was aked before but did not see an answer. I am new to this anyone give me pointers on how to put this in a User Control
(If this comment was disrespectful, please report it.)

 
2/18/2006 9:37:08 AMJaime Bula

Great Code. 5 from me.
(If this comment was disrespectful, please report it.)

 
3/14/2006 2:37:55 PMKen Ballantyne

Text representing URLs and the mailTo are being converted to links - but appear to be non active - ie nothing happens when I click on them - do I have a problem with the helper objects ?
(If this comment was disrespectful, please report it.)

 
5/24/2006 1:36:43 PMNess

This is the way to solve the problem: "A potentially dangerous Request.Form value was detected from the client"

for example if you already have:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="MyForm.aspx.vb" Inherits="Proj.MyForm"%>


then this should become:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="MyForm.aspx.vb" Inherits="Proj.MyForm" validateRequest="false"%>


(If this comment was disrespectful, please report it.)

 
7/4/2006 9:50:00 AMSanthosh

Excellent code sample, easy to use !!! keep up the good work guys.
(If this comment was disrespectful, please report it.)

 
8/2/2006 7:05:34 AMNet ranger

very good program design. keep up the good work.
(If this comment was disrespectful, please report it.)

 
11/16/2006 9:13:40 PMM.idrees

i want to need complete code with execution process in asp.net.i am beginner in asp.net before i use asp . i am very thanful to u for the sending complete information to me .
best regards
M.idrees
(If this comment was disrespectful, please report it.)

 
4/17/2007 10:17:15 AMSean

Love the code and it works great in IE but cant seem to get it to work in FireFox. By not work I mean none of the option buttons work and the editor field is not populated and cannot be clicked on to add text. Any thoughts? I would love to get it working in FF.

(If this comment was disrespectful, please report it.)

 
9/3/2007 5:14:22 PMIlkay Terzi

I guess we need to find "img src"tag and then upload the file in that address to the server.Then replace this address with our upload address with some string manipulators.These lines are needed to be like that , else it would be a problem if we tried to copy & paste a word file into this page.Other than this , it's a very high level work , i think.
(If this comment was disrespectful, please report it.)

 
11/15/2007 9:23:43 AMperfect

its awesome! keep up the good job!
(If this comment was disrespectful, please report it.)

 
1/8/2008 5:49:35 AMAjay KN

Dear sir
The application is really wonderfull can you please tell me how to achive this my id is knajay_jsp@yahoo.co.in
Thanks in advance
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.