Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > VS.NET 2002/2003
|
VS.NET 2002/2003 Discussions about the Visual Studio.NET programming environment, the 2002 (1.0) and 2003 (1.1). ** Please don't post code questions here ** For issues specific to a particular language in .NET, please see the other forum categories.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VS.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2003, 12:56 PM
Registered User
 
Join Date: Jul 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to joevnvdvc
Default Text Editing/Modification in VB.Net/ASP.Net

I'm not exactly sure if this is the proper forum for this, if you think there are other forums more appropriate feel free to inform me.

I'm using ASP.Net with the codebehind as VB.Net to create a text editor for my messageboard with a backend SQLServer database holding the messages. The messageboard is in working condition and is mainly composed of a datalist with a ItemTemplate and editTemplate mode. Adding modifications to the text itself is fairly easy, simply a matter of adding html tags such as <b> </b>. I was able to provide functionality to allow the user to select/highlight a piece of text and click on a button in the edit mode leading to the text being modified with the html tags, uploaded to the database, and displayed properly formatted in the view mode. I haven't figured out how to turn off formatting if the text is formatted already--as in if you have a word that's in bold font, and you select that word and click on bold again, you'd expect it to be reverted back to normal-not bold anymore.
That isn't the main issue though. The user is unsatisfied with the implementation of the text editor section. He wishes it to be like ms word in that when you format a piece of text, it shows the text format change immediately right there. In addition he does not wish to see the html tags. I've tried the textbox control and the label control, and they work differently in displaying the text. The label control will display the text properly formatted, but does not allow editing such as deletion, adding, modification of words. The textbox will display the html tags and allows editing. I have been unable to find a control that combines the best of both worlds--that is, allows editing and displays the text properly formatted. If there is such a control, please let me know.
Failing that, I placed both a textbox and a label on the edit template linked to the message in the database. I used code to eliminate all html tags from the text in the textbox. I was hoping to find a way to link the text in the textbox with the text in the label in such a way that when someone modifies/adds/deletes text in the textbox, it gets reflected in the label. The onchange property of the textbox would seem to support that. However, when I invoke the update method in the textbox, it updates the database but goes back to the view page. I would like help in finding a way to link the textbox and the label in the manner described above.
If there are any further questions or details that I can answer/provide, let me know.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Online editing in asp.net bneeraj General .NET 0 February 3rd, 2005 09:32 AM
Editing in Datagrid with ASP.NET rotsey General .NET 0 October 22nd, 2004 01:38 AM
.NET Text / HTML editing problem clickco General .NET 3 May 12th, 2004 02:47 PM
ASP.Net/VB.Net Text Editor joevnvdvc Classic ASP Basics 0 July 29th, 2003 03:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.