以管理员身份登录时如何添加功能来编辑网页 [英] How to add a functionality to edit the webpage when logged in as admin

查看:87
本文介绍了以管理员身份登录时如何添加功能来编辑网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的网站已完成且处于正常工作状态.

现在,我需要添加创建CMS"作为其一部分....当管理员登录时,

我需要在任何页面上显示一个编辑按钮,当单击编辑"按钮时,他应该能够编辑该页面,并且编辑的格式应与该页面的格式相同.


我怎么能做到这一点.我的项目在MVC3 C#剃须刀中.

预先感谢大家.

Hi,

I have a website all done and in working condition.

Now i need to add Create the CMS as part of that.... when admin logged,

I need to show a edit button on any page, when clicked on edit button , he should be able to edit the page and the edit should be in the same format of the page.


How can i achive this. my project is in MVC3 C# razor .

Thanks in advance guys.

推荐答案

您可以使用^ ]. Google可以为您提供一些示例,说明如何在MVC3中使用它.唯一的事情是您必须将文章存储在存储库(例如数据库)中,并将其视为数据.实际上,可以编辑的文章只是模型中映射到textarea元素的文本字段.
You can use CKEditor[^] for example. Google can give you several examples how to use it in MVC3. The only thing is that you have to store your articles in a repository (a database for example) and treat them as data. Actually an article, that can be edited is just a text field in the model mapped to a textarea element.


这篇关于以管理员身份登录时如何添加功能来编辑网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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