Click event for multiline textbox
This is for a multiline textbox on an asp.net site. I can use either a html control or a an asp.net control but what I want to do is somehow recognize which line is being clicked - preferably server-side so that it works without javascript but a jquery solution would be fine as well. After the line is clicked I need to take the text from said line, and return an output after a xml lookup.
I'm just wondering if this is at all possible or if should just think of a better way to pr开发者_运维百科esent my data.
Thank you.
If you don't need to edit the data on the client side, and want to use an ASP.NET component, why not just use a list box?
You can parse your text line by line on the back end, add appropriate spacing if nessissary, and add the items to a listbox.
You can respond to the click event on the post back and identify the line clicked by grabbing the selected item and doing whatever processing you need to do on the back end.
Aside from diving into Javascript, your options are pretty limited.
精彩评论