如何在asp.net中显示多行输出 [英] how to display multi line output in asp.net

查看:167
本文介绍了如何在asp.net中显示多行输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两个多行文本框(名称输入和输出)和一个按钮中创建一个应用程序.现在,在单击提交按钮输出文本框后,用户在输入文本框(用户输入)中输入"abc和pqr".输出在输出文本框中显示输入文本框.
输出显示在输出文本框中,如以下格式所示
abc
pqr

I create one application in that two multi line textboxes(name input and output) and one button. now user type ''abc and pqr'' in input textbox(user input) after clicking on submit button output textbox(Output) displays input textboxes in output textbox.
output is displays in output textbox like following format
abc
pqr

推荐答案

尝试一下-
Try this-
txtInput.Text += txtOutput.Text+"\n";




or

txtInput.Text += txtOutput.Text+"\r\n";



我觉得,您的问题应该是如何在ASP.Net文本框中添加换行符?"

希望对您有所帮助:)



I feel, your question should be "how to add line break in ASP.Net textbox?"

Hope, it helps :)


我会通过youtube教程并获得一本很好的介绍性书籍.我没有看到有关您在哪里尝试执行此操作的任何信息.应该有一个运行代码的函数.您正在使用哪个功能? Page_Load? Button_Click?如果什么都看不到,则说明您的代码未在执行,必须使用方法/函数/事件处理程序.如果仅看到一些文本而不是全部,则页面标记中的设置设置不正确.

编码快乐吗?
I would go though a youtube tutorial and get a good intro book on this. I don''t see any info on where you are trying to do this. There should be a function where your code is run. Which function are you using? Page_Load? Button_Click? If you see nothing, then your code is not being executed and a method/function/event handler must be used. If you are only seeing some text and not all, then a setting in your page tags is not set right.

Happy Coding?


这篇关于如何在asp.net中显示多行输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆