开发者

Click event for multiline textbox

开发者 https://www.devze.com 2023-01-07 09:19 出处:网络
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-s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号