I want to add a comment feature in my ASP.NET website that is similar in *.com. Here the entire page is not getting posted, instead ajax is being used i hope.How does the value entered inside the textarea is passed to the server page ? as querystring for an ajax get/post call ? .I believe its not a good idea to do so when the content of the text area (text ) is large in size . How can i pass special characters ? Whats is the best method to do this ? Please advice
我想在我的ASP中添加一个评论功能。类似于*.com的网站。在这里,整个页面没有被发布,相反,我希望使用ajax。如何将输入到textarea中的值传递到服务器页面?作为ajax get/post调用的查询字符串?.我认为当文本区域(文本)的内容很大的时候这样做不是一个好主意。我如何通过特殊字符?最好的方法是什么?请建议
2 个解决方案
#1
1
IE has a size limitation for get
requests. This document is a good guide for choosing when to use get
or post
.
IE对get请求有大小限制。本文档是选择何时使用get或post的好指南。
#2
2
Your instincts are correct. You should only use QueryString for small things like ID's. Use GET and POST for passing larger amounts of data.
你的直觉是正确的。您应该只对像ID这样的小事情使用QueryString。使用GET和POST传递大量数据。
#1
1
IE has a size limitation for get
requests. This document is a good guide for choosing when to use get
or post
.
IE对get请求有大小限制。本文档是选择何时使用get或post的好指南。
#2
2
Your instincts are correct. You should only use QueryString for small things like ID's. Use GET and POST for passing larger amounts of data.
你的直觉是正确的。您应该只对像ID这样的小事情使用QueryString。使用GET和POST传递大量数据。