如何在MVC中添加Session以保存在文本框中输入的文本 [英] How to add Session in MVC to save text entered in a textbox

查看:124
本文介绍了如何在MVC中添加Session以保存在文本框中输入的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好..



我是编程新手,尤其是MVC。我为客户端设计了一个MVC 3 ASP.NET博客。该博客还拥有管理员用于内容管理的用户帐户。



登录后,管理员可以创建新帖子。有时帖子可能是长文字。因此,我想创建一个会话,以便在用户输入内容时暂时保存文本框中的内容。一旦用户单击提交按钮,会话结束,文本将被永久保存。



这允许用户离开邮件中途,从他们离开的地方返回并继续。此外,如果浏览器意外关闭,用户不会丢失已输入的文本。



我一直在尝试查找教程,但无法找到到目前为止有用的教程。



任何帮助,或指向有用的教程将不胜感激。



谢谢

Hello..

I am new to programming, especially to MVC. I have designed a blog in MVC 3 ASP.NET for a client. The blog also have user account for admin for content management.

Once logged in, Admin can create new post. Sometimes the post can be long text. Therefore, I want to create a session to temporarily save the content within the text box as the user types it in. Once the user click the submit button, the sessions ends and the text will be permanently saved.

This allows the users to leave the post half way through, come back and carry on from where they left. Also, if the browser close accidently, the user does not loose the text already typed in.

I have been trying find tutorial on this, but was unable to find a useful tutorial so far.

Any help, or point to useful tutorial would be greatly appreciated.

Thanks

推荐答案

这篇关于如何在MVC中添加Session以保存在文本框中输入的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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