How to put line numbers in Textbox with multiline
-
I have a textbox with multiline where one can write source code and compile & run it,my requirement is to implement line number like(1,2,3...) in each new line of textbox like program editor.....Thanks & Appreciates for your reply.
-
I have a textbox with multiline where one can write source code and compile & run it,my requirement is to implement line number like(1,2,3...) in each new line of textbox like program editor.....Thanks & Appreciates for your reply.
A simple hack is to put a listbox to the left of the textbox and display line numbers as items in the list box. Then you change the borders of the list box and the text box to make them appear as a single control. For more advanced uses, you need to create your own custom control like ICSharpCode.TextEditor[^] or AvalonEdit[^]
-
I have a textbox with multiline where one can write source code and compile & run it,my requirement is to implement line number like(1,2,3...) in each new line of textbox like program editor.....Thanks & Appreciates for your reply.
There is no direct way or a control that does what you seek. You have to develop your own control for such behavior.
Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]
-
There is no direct way or a control that does what you seek. You have to develop your own control for such behavior.
Sandeep Mewara Microsoft ASP.NET MVP [My latest Article]: Server side Delimiters in ASP.NET[^]
Thanks For ur reply :) I have got the solution by using jquery plugin... The below is the link for whole solution: http://alan.blog-city.com/jquerylinedtextarea.htm