文章分类 - .net
摘要:我们先来看看C#中如何操作内存,也就是非托管的数据。这需要引用System.Runtime.InteropServices命名空间。该命名空间下的Marshal的一些静态方法提供了这样的功能: [代码]
阅读全文
摘要:引用自:http://topic.csdn.net/u/20080624/10/26a45062-572c-47e9-bb38-d9aa05b6c2ed.html主要的原理就是替换模板里的特殊字符。 1、静态模板页面 template.html,主要是定义了一些特殊字符,用来被替换。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitio...
阅读全文
摘要:以下是思路假设:当前页为A,需要open的页面为B准备:跳转页面C(需要多增加一张页面)首先在当前页并不用window.open(),而是用window.showModalDialog(C,'','dialogWidth=1px;dialogHeight=1px;');把C页面show出来.再在C页面的load里写以下JS:<a id=aa href='B页面' target='_blank...
阅读全文
摘要:ASP.NET2.0新增的功能,由于经常采用一个页面通过不同的参数来显示不同的内容,因此常常需要实现动态输出不同的htmlheader, 比如title, keywords, descrtptions,csslink,meta,icon等。代码如下:protected void Page_Load(object sender, EventArgs e){ //Page title Page.Tit...
阅读全文
摘要:转自:http://www.cnblogs.com/JeffreyZhao/archive/2007/03/22/683434.html首先,我们先在页面上随意放一个UpdatePanel和UpdateProgress,里面的内容都非常简单,如下:[代码]在UpdateProgres中,我们放置一个id为modalBackground的div作为Modal背景,还有一个id为animationDi...
阅读全文
摘要:转自:http://hi.baidu.com/laig8588/blog/item/9c58b7b72fe1bdfc30add143.htmlasp.net开发中,经常遇到“从客户端检测到有潜在危险的Request.Form 值”错误提示,很多人给出的解决方案是:1、web.config文档<system.web>后面加入这一句: <pages valid...
阅读全文
摘要:一:通过Web Services显示和下载文件 我们这里建立的Web Services的名称为GetBinaryFile,提供两个公共方法:分别是GetImage()和GetImageType(),前者返回二进制文件字节数组,后者返回文件类型,其中,GetImage()方法有一个参数,用来在客户端选择要显示或下载的文件名字。这里我们所显示和下载的文件可以不在虚拟目录下,采用这个方法的好处是:可以根...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public static string Intercept(string input, int p) { Encoding encode = Encoding.G...
阅读全文
摘要:C#中,弹出窗口的代码为: MessageBox("用户名或密码错误!","错误:"); 而在Asp.net中,则不可以用这种方法了,这时我们可以写一个类Message(名字随便取),内容如下: //---------------------------------------//作者:明天去要饭//QQ:305725744//--------------------------------...
阅读全文
摘要:下载地址: http://www.bincess.cn/onlineuserservice.txt 使用方法,请参考下面的代码: using System; using System.Collections.Generic; using System.Text; using System.We...
阅读全文
浙公网安备 33010602011771号