随笔分类 - .NET
摘要:''' ''' 压缩 ''' ''' ''' ''' Public Sub CompressFile()Sub CompressFile(ByVal sourceFile As String, ByVal destinationFile As String) ' make sure the source file is there ...
阅读全文
摘要:Abs(number) 取得数值的绝对值。 Asc(String) 取得字符串表达式的第一个字符ASCII 码。 Atn(number) 取得一个角度的反正切值。 CallByName (object, procname, usecalltype,[args()]) 执行一个对象的方法、设定或传回对象的属性。 CBool(expression) 转换表达式为Boolean 型态。...
阅读全文
摘要:现将做好的网站上传至服务器上(.net2.0)后运行发现如下问题: 在某些页面的LinkButton控件点击后无法运行。IE状态栏提示javascript脚本错误(WebForm_PostBackOptions未定义),但在本地是可以正常使用。在网上查找发现一些服务器空间提供商在对ASP.NET的安全处理措施上,去掉了一些默认的映射,以保证服务器尽可能的少受入侵攻击和潜在的安全漏洞的威胁。 经在本...
阅读全文
摘要:OleDbConnection conn = new OleDbConnection(); DataTable mydt = new DataTable("mydt"); DataColumn dc = new DataColumn(); dc.DataType = System.Type.GetType...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using IWshRuntimeLibrary;namespace Windows...
阅读全文
摘要:1.web.config --> 2.Default.aspx show/2007/05/16.html 3.show.aspx protected void P...
阅读全文
摘要:模板文件内容:mb.html Create Html title:$title$content:$content$ 代码: using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using Syste...
阅读全文
摘要:Imports System.IOImports System.NetPublic Class Form1Class Form1 Private Sub Button1_Click()Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click ...
阅读全文
摘要:private void CopyWithProgress(int status) { // Display the ProgressBar control. //pBar1.Visible = true; // Set Minimum to 1 to represent the first file being co...
阅读全文
摘要:CODE: 1Imports System.Data 2Imports System.Data.OleDb 3 4Public Class Form1Class Form1 5 6 Private Sub Button1_Click()Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ...
阅读全文
摘要:Dim table As DataTable = New DataTable("jhreport") Dim column As DataColumn column = New DataColumn() column.ColumnName = "id" table.Columns.Add(column) ...
阅读全文
摘要:在Windows2K和XP中(IIS5.X),请求首先被intinfo.exe接受,然后它再将其请求发送到aspnet_isapi.dll,最后才由aspnet_isapi.dll将请求发送至ASP.NET工作进程,即aspnet_wp.exe;在Windows2003中(IIS6.0),一个名为http.sys的驱动程序首先截获请求信息,接着它将请求传递给一个工作进程的实例(worker pro...
阅读全文
摘要:1//在数据库中新建数据表 2 string MySQL ="IF OBJECT_ID(N'MyTest..TableName', N'U') IS NOT NULL "+ 3 "DROP TABLE TableName;" + 4 "CREATE TABLE TableName ("+ 5 ...
阅读全文
摘要:1//备份MyBakDb.bak数据库 2 string MyFileName = Application.StartupPath + "\\MyBakDb.bak"; ; 3 string MyDatabase = "myTest"; 4 string MySQL= "use master;backup database @M...
阅读全文
摘要:用WebServices作数据访问层小结:本小结所有工程:公共工程: Demo.Common服务工程: Demo.WebServices访问工程: Demo.DataAccess测试工程: Demo.Test具体实现方法:一. 新建"类库"工程: Demo.Common 在该工程中新建类: DemoUtils.vb ,并在该类中添加两个方法: Serialize 和 Deserialize...
阅读全文
摘要:1 2 '------------------//接收远程数据 13Imports System.Net 14Imports System.Net.Sockets 15Imports System.Threading 16Imports System.Text 17Public Class frmMainClass frmMain 18 19 Dim myPort As...
阅读全文
摘要:1 2'公共属性 3 4Public Class CommonClass Common 5 Private _fileType As String '播放类型 6 Public Property fileType()Property fileType() As String 7 Get 8 fileType = _fi...
阅读全文
摘要:Function pinyin()Function pinyin(p As String) As String Dim i as Integer = Asc(p) Select Case i Case -20319 To -20284: pinyin = "A" Case -20283 To -19776: pinyin = "B" Case -19775 To -19219: pinyin ...
阅读全文
摘要:Private Sub TextBox1_KeyDown()Sub TextBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Escape Then ...
阅读全文
摘要:winform中,listview是没有办法设置行高的,没行之间排得密密麻麻的,很不好! 可以加入一个imagelist来 撑大 行,实现行高的设置! // 设置行高 20 ImageList imgList = new ImageList(); imgList.ImageSize = new Size(1, 20);//分别是宽和高 ...
阅读全文
浙公网安备 33010602011771号