Click here to Skip to main content
16,007,885 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to insert mathematical eq.in textbox asp.net??
Posted
Updated 3-Oct-14 18:44pm

Text boxes are designed to carry only the plain text, without any formatting; so it highly limits the repertoire of expression you can write to something like
x³ = ln(y) + (x+1)√y

In this expression, I used no HTML markup, to mimic this situation, used only Unicode characters. (Sorry, even the root looks ugly.)

No, this is not a way to represent mathematical expression. You can do a lot more (but still, only pretty simple things) if you use the attribute contenteditable.
Please see the demo: http://html5demos.com/contenteditable[^].

Look at the HTML source of this page to see how to write such HTML.

And, finally, you can combine this idea with new HTML5 feature: the ability to natively show MathML. Please see:
http://en.wikipedia.org/wiki/HTML5[^],
http://en.wikipedia.org/wiki/HTML5[^].

MathML will allow to show really complex mathematical notation.

—SA
 
Share this answer
 
v2
Comments
[no name] 4-Oct-14 8:18am    
Eheh, very useful info, my 5. Regards, Bruno
Sergey Alexandrovich Kryukov 4-Oct-14 14:43pm    
Thank you, Bruno.
—SA
Afzaal Ahmad Zeeshan 4-Oct-14 16:10pm    
+5, had more data than I had in my mind to answer this question! :-)
Sergey Alexandrovich Kryukov 4-Oct-14 16:33pm    
Thank you, Afzaal.
—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900