摘要: private void WebClientButton_Click(object sender, System.EventArgs e){PageUrl = UrlText.Text;WebClient wc = new WebClient();wc.Credentials = CredentialCache.DefaultCredentials;///方法一:Byte[] pageData = wc.DownloadData(PageUrl);ContentHtml.Text = Encoding.Default.GetString(pageData);/// 方法二:/// ****** 阅读全文
posted @ 2013-03-01 11:46 甜菜波波 阅读(204) 评论(0) 推荐(0)
摘要: 1. js版<input style="visibility:hidden" id="upload" type="file" name="xxx" onchange="var a=this.value;alert(a);document.getElementById('uploadname').innerHTML=a;" /><a id="uploadname" href="javascript:document.getElemen 阅读全文
posted @ 2013-02-28 15:44 甜菜波波 阅读(317) 评论(0) 推荐(0)
摘要: 第一种方法//上传文件publicvoidFN_UpFiles(){//遍历File表单元素HttpFileCollectionfiles=HttpContext.Current.Request.Files;//StringBuilderstrMsg=newStringBuilder();//strMsg.Append("上传的文件分别是:<hrcolor='pink'/>");try{for(intiFile=0;iFile<files.Count;iFile++){//检查文件扩展名字HttpPostedFilepostedFile=f 阅读全文
posted @ 2013-02-28 15:11 甜菜波波 阅读(246) 评论(0) 推荐(0)
摘要: 1.新建一个test.aspx页面<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title> <script 阅读全文
posted @ 2013-02-28 14:44 甜菜波波 阅读(316) 评论(0) 推荐(0)
摘要: jquery表单插件 jquery.form.js [JQuery框架应用]:form.js官方插件介绍Form插件,支持Ajax,支持Ajax文件上传,功能强大,基本满足日常应用。1、JQuery框架软件包下载 文件: jquery.rar ... 阅读全文
posted @ 2013-02-27 16:37 甜菜波波 阅读(244) 评论(0) 推荐(0)
摘要: 在Access07之前的数据库后缀名均为*.mdb 而连接字符串写成Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myFolder\*.mdb;Persist Security Info=False;但是Access07和Access10将后缀名改为了*.accdb。而通过上述连接的话就会报出"不可识别的数据库格式"异常。需要注意的是Microsoft.Jet.OLEDB.4.0的Oledb的连接方式是比较老的连接方式,而07以后的Oledb连接方式将改成Microsoft.ACE.OLEDB.12.0。改后的连接变成了Pr 阅读全文
posted @ 2013-02-26 14:17 甜菜波波 阅读(1571) 评论(0) 推荐(0)
摘要: 1.bar.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>进度条</title> <script la 阅读全文
posted @ 2012-11-16 13:52 甜菜波波 阅读(253) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Xml.Linq;using System.Data.SqlClient;using System.Text;using System.IO;using System.Collections;using System.Data;using Lucene.Net.Documents;using Lucene. 阅读全文
posted @ 2012-11-14 13:42 甜菜波波 阅读(230) 评论(0) 推荐(0)
摘要: 微软企业库需下载安装1.添加引用Microsoft.Practices.EnterpriseLibrary.Data;Microsoft.Practices.EnterpriseLibrary.Common;2.命名空间引用using System.Data.Common;using Microsoft.Practices.EnterpriseLibrary.Data;3.配置 web.config文件<add name="yoyo" connectionString="server=.;uid=sa;pwd=j;database=yoyo_jx" 阅读全文
posted @ 2012-11-13 14:25 甜菜波波 阅读(246) 评论(0) 推荐(0)
摘要: 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=0 3.应尽量避免在 where 子句中使用!=或<>操作符,否则将引擎放弃使用索引而进行全表扫描。 4.应尽量避免在 where 子句中使用 or 来连接条件,否则 阅读全文
posted @ 2012-11-13 13:32 甜菜波波 阅读(202) 评论(0) 推荐(0)