Solved

How can I allow user to highlight and then  Bold characters in a textbox before submitting info to db?   ASP.NET

Posted on 2014-11-22
5
169 Views
Last Modified: 2014-12-12
In other words, I'm trying to allow the user to format the look of the text before submitting it.

Thanks!

string value; 

        int start = TextBox1.Text.StartsWith("CURSOR POSITION");        
        int addOpeningTag = value.Insert(atIndexStartposition, "/<strong/>");

        int end = TextBox1.Text.EndsWith("CURSOR POSITION");
        int addEndingTag = value.Insert(atIndexEndposition, "/<//strong/>");

        value = TextBox1.Text;
        Label1.Text = value;  // put this value in db with storedprocedure 

Open in new window

0
Comment
Question by:bmanmike39
  • 3
5 Comments
 
LVL 79

Expert Comment

by:David Johnson, CD, MVP
ID: 40460175
you need to use a rich text box vice a regular text box.http://msdn.microsoft.com/en-us/library/aa970779%28v=vs.110%29.aspx
0
 

Author Comment

by:bmanmike39
ID: 40461061
This does not apply to asp.net
0
 
LVL 8

Accepted Solution

by:
Jean Marie Geeraerts earned 500 total points
ID: 40473807
HI, Not sure if you are still looking for an answer here, but you might want to consider TinyMCE to use for a rich text box alternative in asp.net.

This is a free Rich Text Editor you can use in any platform.

http://www.tinymce.com/
0
 

Author Comment

by:bmanmike39
ID: 40496401
I will have accept this answer.  Not what I was looking for, but getting no response.
0
 

Author Closing Comment

by:bmanmike39
ID: 40496402
Thanks
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question