Solved

Can ASP.Net 2.0 textbox handle superscript and subscript?

Posted on 2008-10-20
6
1,130 Views
Last Modified: 2012-06-27
Hello,

I am wondering if there is a way for multiline textboxes to accept superscipt as in x2 + y2 = . where the 2's display as exponents. If not, is there a third party component maybe that could do this?

Thank you
0
Comment
Question by:vstack
  • 3
  • 2
6 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 22756211
Hello vstack,

You have a couple of options I guess. The simple answer is no however. The more complicated answer is that you can specify a specific font which allows the use of the extended characters that such as ?, ?, ? (Ascii Chr(251),(252) & (253)). Or implement an html textarea using something like freetextbox, fckeditor, obout editor, tinyMCE etc that can handle superscript etc.

Regards,

TimCottee
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 22756221
And of course in this view they don't show as the actual characters! ¹ ³ ²
0
 

Author Comment

by:vstack
ID: 22756458
Thanks TimCotee,

I don't think the text editors like freetext will work for me but how did you do the trick with the 'show as the actual characters! ¹ ³ ²'?

How did you specify a specific font  to handle the superscript? Which font?

Thank you




0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 43

Accepted Solution

by:
TimCottee earned 500 total points
ID: 22756725
vstack,

That was using the RTF entry option rather than plain text here.

Here is an example of this, though it seems that I don't need to pick a particular font (sometimes you do, it just depends on what characters are available in what font).

x² + y² = z²

TimCottee
0
 

Author Comment

by:vstack
ID: 22757746
Thanks for the help.  I am not sure if what I am trying to accomplish is practically doable.  I wanted the user, me, to simply paste the Course Objectives section into a multiline text box, then I would save the textbox as a text file and read the newly created file line by line, pushing each line into the db as an objective.  This works fine and saves a gazillion lines of data entry.  Once our current batch of course info sheets, about 1200 is saved to db then all new info sheets would be developed inside this software.  No need to read any more files.  The only caveat is this special character thing.

Any suggestions?  

I'll award you the points anyway as I learned something new today which is always a good thing.

Thanks
0
 

Expert Comment

by:sobreiro01
ID: 22763619
Hi,

The asp.net text box, is redered as a "<input type="text>" tag in HTML.
Try to always thing in what is really the .NET components, once they are used on the web, so thay a in the reality HTML controls with some functionality added to make it work server side.

However, you can do anything with it, just thing in what you should do in HTML, and then, do it.
You can add attributes to the textbox by using AddAttributes method of the instance of the control you are working.

Hope this helps.
André Luiz Sobreiro
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
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…

820 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