2011年9月29日

winform程序操作或执行javascript程序

摘要: 必须在窗体类头部添加[PermissionSet(SecurityAction.Demand, Name = "FullTrust")][System.Runtime.InteropServices.ComVisible(true)]调用web页面上的javascript方法webBrowser.Document.InvokeScript("aa");web页面调用winfom方法window.external.SendWebMsgToWinform("msg"); 阅读全文

posted @ 2011-09-29 14:19 mingfeng 阅读(188) 评论(0) 推荐(0) 编辑

2011年9月20日

C#对象与JSON串转换

摘要: C#对象与JSON串转换 2010-03-18 16:07 DoNet2.0 需要借助于Newtonsoft.Json.dll using System; using System.IO; using System.Text; using Newtonsoft.Json; namespace OfflineAcceptControl.UCTools { public class JsonTools { // 从一个对象信息生成Json串 public static string ObjectToJson(object obj) ... 阅读全文

posted @ 2011-09-20 15:54 mingfeng 阅读(1152) 评论(0) 推荐(0) 编辑

2011年3月7日

导出html页面 EXCEL

摘要: //导出html页面 public void OutPutExcel(string title) { Response.Clear(); Response.Buffer = true; Response.Charset = "utf-8"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(title + ".xls")); Response.ContentEncoding = Syste 阅读全文

posted @ 2011-03-07 17:54 mingfeng 阅读(398) 评论(0) 推荐(0) 编辑

2010年8月23日

C#流的应用实例

摘要: StringWriter和HtmlTextWriter  Response.Clear();StringWriter sw = new StringWriter();HtmlTextWriter htw = new HtmlTextWriter(sw);rpData.RenderControl(htw);  (divPanel.RenderControl(hw);)Response.Write(s... 阅读全文

posted @ 2010-08-23 16:06 mingfeng 阅读(189) 评论(0) 推荐(0) 编辑

2010年8月20日

常用SQL语句

摘要: 创建表create table [表名] ( [自动编号字段] int IDENTITY (1,1) PRIMARY KEY , [字段1] nVarChar(50) default '默认值' null , [字段2] ntext null , [字段3] datetime, [字段4] money null , [字段5] int default 0, [字段6] Decimal (12,4)... 阅读全文

posted @ 2010-08-20 18:05 mingfeng 阅读(142) 评论(0) 推荐(0) 编辑

2010年5月8日

jquery常用语句

摘要: dropdownlist:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/... 阅读全文

posted @ 2010-05-08 11:47 mingfeng 阅读(1516) 评论(0) 推荐(0) 编辑

2010年4月1日

打工皇帝

摘要: 正如"打工皇帝"唐骏说:"我觉得有两种人不要跟别人争利益和价值回报。第一种人就是刚刚进入企业的人,头5年千万不要说你能不能多给我一点儿工资,最重要的是能在企业里学到什么,对发展是不是有利……"人总是从平坦中获得的教益少,从磨难中获得的教益多;从平坦中获得的教益浅,从磨难中获得的教益深。一个人在年轻时经历磨难,如能正确视之,冲出黑暗,那就是一个值得敬慕的人。最要紧的是先练好内... 阅读全文

posted @ 2010-04-01 17:40 mingfeng 阅读(179) 评论(0) 推荐(0) 编辑

2010年3月24日

从数据库中查询日历SQL

摘要: set datefirst 1 select * from dbo.f_calendar(2010,07) 阅读全文

posted @ 2010-03-24 13:34 mingfeng 阅读(332) 评论(0) 推荐(0) 编辑

2010年3月6日

设为浏览器首页

摘要: 将你的网站设为浏览器的首页 只要在页面适当位置加入如下语句,并将“http://....”替换为你的网址. <a href="#" onclick="this.style.behavior='url(#default #homepage)';this.setHomePage('http://....);">将本站设为首页</a> 将你的网站添加到收藏... 阅读全文

posted @ 2010-03-06 17:39 mingfeng 阅读(254) 评论(0) 推荐(0) 编辑

2010年3月2日

.NET如何实现伪静态

摘要: 其实所谓的伪静态页面,就是指的URL重写,在ASP.NET中实现非常简单 首先你要在你的项目里引用两个DLL: ActionlessForm.dll URLRewriter.dll 真正实现重写的是 URLRewriter.dll 但是如果你要实现分页,那么必须使用这个ActionlessForm .dll 首先在web.config里写 configSec 其实所谓的伪静态页面,就是指的URL重写,在ASP.NET中实现非常简单   首先你要在你的项目里引用两个DLL:   ActionlessForm.dll   URLRewriter.dll   真正实现重写的是 URLRewriter 阅读全文

posted @ 2010-03-02 16:12 mingfeng 阅读(973) 评论(0) 推荐(0) 编辑

导航