这叫什么?以及如何实现呢?
我想制作一个类似于 ASP.NET 的“写新帖子”页面
,或者
如何制作类似于 https://stackoverflow.com/ 的页面questions/ask
请注意,
我不想引用已经制作的控件,例如免费的富文本编辑器等。
我想自己完成所需的编码。
我还想知道这种页面的名称是什么?当我在 Google 上搜索如何发帖时,它出现了 HTML 的 GET 和 POST 方法。
初步尝试:- 在更新平面内单击按钮回发事件,
literal1.text = textbox1.text
假设用户将提供类似 bold 的格式, 但文本框没有接受任何此类输入。
I would like to make a WRITE A NEW POST page similar to ASP.NET
or
how to make a page similar to https://stackoverflow.com/questions/ask
Please note,
I do not want reference to already made controls like free rich text editor, etc.
I would like to do the required coding myself.
I would also like to know what is the name given to this kind of page? As I search Google for how to make a post and it comes up with GET and POST methods of HTML.
Initial attempt:-
on button click post back event within the update plane,
literal1.text = textbox1.text
assuming that user will provide formats like bold,
but the textbox is not taking any such input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您可以选择,我建议使用 ASP.NET MVC 而不是 WebForms。尽管有更多的学习曲线,但它是更适合 Web 开发的抽象。
虽然您尝试做的大部分事情都相当简单,但您是对的,常规 TextBox 控件不会接受 HTML 输入。 StackOverflow 编辑器 是一个自定义构建的编辑器,使用 MarkDown 语法。这里有一些关于他们的编辑器实现的有趣信息(排名不分先后):
If it's at all an option for you, I would suggest using ASP.NET MVC instead of WebForms. Although there's a bit more of a learning curve it is a more appropriate abstraction for web development.
Although most of what you are trying to do is fairly straight forward, you're right, regular TextBox controls will not take HTML input. The StackOverflow editor is a custom built editor that uses MarkDown syntax. There's some interesting information on their implementation of the editor here (in no particular order):