如何使用Asp.Net实现文档查看和编辑 [英] How Do I Implement Document Viewing And Editing Using Asp.Net

查看:67
本文介绍了如何使用Asp.Net实现文档查看和编辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看和编辑特定文件夹中可用的文档。我想要执行的操作就像谷歌驱动器在线文档查看器和编辑器选项。所以请尽快给我一个c#中的代码

I want to view and edit a document which is available in a particular folder.The operation which i want to perform is like google drive online document viewer and editor option . so please provide me a code in c# as soon as possible

推荐答案

适合初学者

step1)只需设计一个带简单div的网页runat服务器并设计它就像一个文本框并添加一个asp按钮。



step2)现在打开按钮的click事件。和

获取数据。并将其保存在sql数据库中。





它只是为了存储第一个完成这个并让我知道你是否可以实现这个



来源:



for begineers
step1) just design a web page with simple div with runat server and design it just like a textbox and add a asp button .

step2) now open the click event of the button. and
get the data. and save it in sql database.


its just to store first complete this and let me know if u could achive this

source:

<body>

<form runat="server">

<pre lang="xml"><div id="andy" runat="server" contenteditable style=" background-color:Silver; color:Red; height:300px; width:400px; ">
   this is ur doc viewer cum edittor

    </div>
    <asp:Button ID="btnadd" runat="server"  />

</form>

</body>



</pre>


<pre lang="c#">



</pre>



现在你需要做的是从ui获取数据




now what ull have to do is get the data from ui

protected void btnadd_Click(object sender, EventArgs e)
        {
            string a = andy.InnerHtml;
//store the a value into sql db
        }

void loaddatainto edditor()
{

//now u have the data on hand from sql db

andy.InnerHtml = // a data from db


}







这是足够的,这是保存文档并在以后查看或使用asp编辑的最佳方法之一




is this enough this is one of the best idea to save a document and view them later or edit using asp


这篇关于如何使用Asp.Net实现文档查看和编辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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