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
165 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 78

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now