易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net里导出excel表或Word的方法

对于大量的数据,有时候导出到Excel中将更加方便进行数据统计分析,而对于排版打印则导出到World文档中更加方便。在ASP.NET可以通过少量代码实现这两种导出。
        新建一页面,该页面布局Html源码如下:
<form id="form1" runat="server"><div>
        <asp:Button ID="cmdOpen" runat="server" Text="在线打开" CommandName="open"
OnCommand="Button_Click" />&nbsp;<asp:Button ID="cmdSave"
            runat="server" Text="本地保存" CommandName="save"
OnCommand="Button_Click" />
        <asp:DropDownList ID="listType" runat="server">
            <asp:ListItem Value="excel">Excel</asp:ListItem>
            <asp:ListItem Value="word">Word</asp:ListItem>
        </asp:DropDownList><br />
        <br />
        数据源:<br />
        <br />
        <asp:GridView ID="myGW" runat="server">
        </asp:GridView>
    </div></form>
       这里没有什么特别的,只需要注意在线打开与本地保存两个按钮通过CommandName进行检验并触发相应的动作
,DropDownList控件存放了可以导出的格式,可以自己添加如txt、html等格式。准备工作就绪以后,可以进行代码的书写,以完成我们需要的功能:
    protected void Page_Load(object sender, EventArgs e)
    {
&


相关文档:

asp.net(c#) 返回上一页

摘抄前辈们的
其实要实现这个功能主要还是要用到javascript
方法一:
在asp.net的aspx里面的源代码中
<input type="button onclick="javascript:window.history.go(-1);"value="返回上一页">
浅析:这个是用了HTML控件,通过一个onclick的事件,调用了javascript中的一个方法就可以了。这个是最简单的了,也同样 ......

ASP.NET Events

Here is the full list of all events that occur in an ASP.NET application, from the standard modules, to the page, master page, page controls and master page controls.
I have not included the IIS 7 specific events (Log, for example).
What
When
HttpApplication.BeginRequest
HttpApplication.Auth ......

CKEditor和CKFinder在ASP.NET中的应用

介绍
CKEditor是新一代的FCKeditor,是一个重新开发的版本。CKEditor是全球最优秀的网页在线文字编辑器之一,因其惊人的性能与可扩展性而广泛的被运用于各大网站。而CKFinder是一个功能强大的ajax文件管理器。其简单的用户界面使得各类用户,不管是从高级专业人才,还是互联网初学者,都够直观、快速学习的学习使用它。
& ......

.NET、ASP.NET控件及源码大汇总

.NET、ASP.NET控件及源码大汇总
作者:Allan_Green  来源:博客园  发布时间:2009-02-12 10:33  阅读:224 次  原文链接   [收藏]  
.NET、ASP.NET控件及源码大汇总
CuteEditor 6.0 在线HTML编辑器的领航者
ComponentArt.Charting.WebChart.dll
Comp ......

Cascading DropDownLists With ASP.NET and jQuery


Cascading drop down lists is a really nice feature for web developers. I thought it was time to write an article on how to do this using ASP.NET and jQuery. Well here’s one way of doing it. Before we get started, this example uses the latest version of jQuery which is 1.3.2.&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号