'使用VBA建立一文字檔
Private Sub CommandButton2_Click()
Dim otfile As String
otfile = "d:\test.csv"
Open otfile For Output As #1
'使用VBA建立一文字檔
Private Sub CommandButton2_Click()
Dim otfile As String
otfile = "d:\test.csv"
Open otfile For Output As #1
<script language="javascript">
function checkInput() {
window.alert(form1.txt_nApply_dt.value.length);
window.alert(event.keyCode);
if (((event.keyCode >= 48) && (event.keyCode <= 57)) || ((event.keyCode >= 96) && (event.keyCode <= 105)) || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 37 || event.keyCode == 39) {
注意調整Form1
<asp:Button ID="btnCheck" runat="server" Text="上傳" UseSubmitBehavior="false" OnClientClick="this.disabled=true;Form1.submit();"/>
步驟一:加入[ICSharpCode.SharpZipLib.dll]元件
步驟二:將下列程式加入Class
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports System.Text
'全型轉半型
Public Function ToNchr(ByRef data As String) As String
Dim sb As New StringBuilder
Imports System.IO
Imports System.Text
'檔案Anis轉成Unicode格式
Dim reader1 As New StreamReader("D:\TEST.DAT", Encoding.GetEncoding(0))
Imports System.IO
Imports System.Text
'StreamWriter匯出文字檔
Dim sL_Path As String = "D:\AAA.csv"
http://vb.ncis.com.tw/LMVB2.0/exp/exp.html
VB新增資料表或資料庫.
http://tw.knowledge.yahoo.com/question/question?qid=1607042107814
======================================================================================================================
設定資料新增或修改的警告視窗
----------------------------
DoCmd.SetWarnings False
======================================================================================================================
詢問視窗
--------
If MsgBox("確定清除資料嗎?", vbYesNo) = vbNo Then
Exit Sub
End If
'--==[頁面]======================================================================--
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test_Calendar.aspx.vb" Inherits="Test_Calendar" %>