<address id="xpjh9"><listing id="xpjh9"><meter id="xpjh9"></meter></listing></address>

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
<noframes id="xpjh9">
<noframes id="xpjh9">

<address id="xpjh9"><address id="xpjh9"><listing id="xpjh9"></listing></address></address>
    <form id="xpjh9"></form><address id="xpjh9"><listing id="xpjh9"><menuitem id="xpjh9"></menuitem></listing></address>

      <noframes id="xpjh9">
      VB.net 2010 視頻教程 VB.net 2010 視頻教程 VB.net 2010 視頻教程
      SQL Server 2008 視頻教程 c#入門經典教程 Visual Basic從門到精通視頻教程
      當前位置:
      首頁 > 網站開發 > ASPnet >
      • asp.net教程之ASP實現文件直接下載

      • 2017-06-11 20:12 來源:未知
      在IE進行文檔鏈接時,如果遇到OLE支持的文檔,IE會自動調用相應程序打開它,有時候這種功能并不是我們所需的,雖然我們可以提醒用戶用鼠標右鍵-->"目標另存為...."命令來下載文檔,但這樣畢竟不太友好,本文描述了利用FSO及Stream方法實現IE直接下載文檔.

      <%@ language=vbscript codepage=65001%>

      <% 
      ''Filename must be input
      if Request("Filename")="" then
      response.write "<h1>Error:</h1>Filename is empty!<p>"
      else
      call  downloadFile(replace(replace(Request("Filename"),"\",""),"/",""))    

      Function  downloadFile(strFile)    
      ''  make  sure  you  are  on  the  latest  MDAC  version  for  this  to  work    
      ''  get  full  path  of  specified  file    
      strFilename  =  server.MapPath(strFile)    

      ''  clear  the  buffer    
      Response.Buffer  =  True    
      Response.Clear    

      ''  create  stream    
      Set  s  =  Server.CreateObject("ADODB.Stream")    
      s.Open    

      ''  Set  as  binary    
      s.Type  =  1    

      ''  load  in  the  file    
      on  error  resume  next    

      ''  check  the  file  exists
      Set  fso  =  Server.CreateObject("Scripting.FileSystemObject")    
      if  not  fso.FileExists(strFilename)  then    
      Response.Write("<h1>Error:</h1>"&strFilename&" does not exists!<p>")    
      Response.End    
      end  if

      ''  get  length  of  file    
      Set  f  =  fso.GetFile(strFilename)    
      intFilelength  =  f.size    

      s.LoadFromFile(strFilename)    
      if  err  then    
      Response.Write("<h1>Error: </h1>Unknown Error!<p>")    
      Response.End 
      end  if  

      ''  send  the  headers  to  the  users  Browse
      Response.AddHeader  "Content-Disposition","attachment;  filename="&f.name    
      Response.AddHeader  "Content-Length",intFilelength    
      Response.CharSet  =  "UTF-8"    
      Response.ContentType  =  "application/octet-stream"    

      ''  output  the  file  to  the  browser    
      Response.BinaryWrite  s.Read    
      Response.Flush    

      ''  tidy  up    
      s.Close    
      Set  s  =  Nothing    

      End  Function    
      end if
      %>      
      相關教程
      江苏快3 www.444801.com | www.kc67.com | www.5484e.com | www.50064g.com | www.78700j.com | www.02500w.com | www.1368n.cc | www.737884.com | www.526053.com | www.91233j.com | www.16878g.com | www.26878x.com | www.gy11.com | www.301990.com | www.68568n.com | www.71233j.com | www.910xj.com | www.443300a.com | www.774808.com | www.202880.com | www.61233k.com | www.2875s.com | www.800986.com | www.50732e.com | www.8999ka.com | www.367137.com | www.12455v.com | www.895544.com | www.196036.com | www.rrle5.com | www.49956t.com | www.66ffb.com | www.569361.com | www.040439.com | www.66332q.com | www.hcw823.com | www.33068.cc | www.yc7701.com | www.983jc.com | www.452815.com | www.c5909.com | www.177949.com | www.15355p.com | www.186327.com | www.839565.com | www.26163m.com | www.599749.com | www.80075v.com | www.lqc0.com | www.60123f.com | www.591017.com | www.9889hc.com | www.78700i.com | www.535666e.com | www.5522d.cc | www.5091f.com | www.99677y.com | www.601497.com | www.11csj.com | www.43131q.com | www.xinyc1.com | www.cp500.in | www.768299.com | www.qucw5.com | www.66870.cc | www.66376z.com | www.66621q.com | www.401279.com | www.939096.com | www.25688n.com | www.109307.com | www.549077.com | www.788464.com | www.igcp3.com | www.73gcw.com | www.9478w.com | www.50024k.com | www.52303z.com | www.34788x.com | www.35155w.com | www.15236.cc | www.cpw | www.3126s.com | www.36788.com | www.99cmc.com | www.588yc.com | www.bxcp3.com | www.88fzc.com | www.9889hc.com | www.7515aa.com | www.48wcp.com | www.2109n.com | www.ybao5.com | www.3qxc.com | www.599260.com | www.367474.com | www.95555w.com | www.60007l.com | www.84499m.com | www.26163f.com | www.2373x.com | www.ya055.com | www.hy5501.com | www.716997.com | www.324611.com | www.77803z.com | www.73166j.com | www.0014z.com | www.yi432.com | www.768299.com | www.974306.com | www.582993.com | www.78949z.com | www.31330.cc | www.910355.com | www.254568.com | www.bxcp3.com | www.hy5504.com | www.583792.com | www.djcp234.com | www.41518t.com | www.622by.com | www.560935.com | www.78949n.com | www.08588q.com | www.914983.com | www.231002.com | www.68689t.com | www.c6386.com | www.336779.com | www.66652d.com | www.88ttz.com | www.81678k.com | www.55228e.com | www.669zf.com | www.599290.com | www.78700n.com | www.336766.com | www.60108t.com | www.hczx3.com | www.346011.com | www.66376w.com | www.luck887.com | www.76520y.com | www.jcai1.com | www.54400y.com | www.cpyz1.com | www.77803k.com | www.c8701.com | www.015990.com | www.9889hc.com | www.389544.com | www.97775.cc | www.330872.com | www.122by.com | www.91233v.com | www.zc35.com | www.52303k.com | www.876899.com | www.60007l.com | www.911203.com | www.08588o.com | www.411515.com | www.9889hc.com | www.51331g.com | www.689144.com | www.50024b.com | www.187152.com | www.04czj.com | www.00840h.com | www.727079.com | www.23022.cc | www.57578b.com | www.xcw866.com | www.2934h.com | www.81520s.com | www.669537.com | www.bxcp3333.com | www.9818j.cc | www.54400z.com | www.202803.com | www.701361.com | www.664by.com | www.36788h.com | www.71399f.com | www.665881.com | www.361gc.com | www.87668m.com | www.326366.com | www.795535.com | www.267by.com | www.21202o.com | www.317199.com | www.904862.com | www.5854j.cc | www.53900p.com | www.99677b.com | www.608986.com | www.c9664.com | www.3479n.com | www.60007r.com | www.77801z.com | www.301990.com | www.592113.com | www.901031.com | www.qmfc1.com | www.657zf.com | www.699by.com | www.8839l.com | www.50074j.com | www.96386i.com | www.412228.com | www.535350.com | www.620316.com | www.775780.com | www.904817.com | www.zcwf7.com | www.656by.com | www.2632j.com | www.7782b.com | www.1555hc.com | www.1368m.cc | www.hj1991.com | www.c2808.com | www.318548.com | www.927836.com | www.910424.com | www.54968f.com | www.606865.com | www.401286.com | www.370766.com | www.80075b.com | www.26299m.com | www.8839g.com | www.138136a.com | www.755806.com | www.hcw332.com | www.50051g.com | www.08588w.com | www.ac3322.com | www.c4530.com | www.609813.com | www.152012.com | www.33598s.com | www.26163t.com | www.9356o.com | www.9889hc.com | www.964688.com | www.295570.com | www.00665g.com | www.74gcw.com | www.xinyc3.com | www.444537.com | www.60007g.com | www.34972.com | www.959122.com | www.326675.com | www.60007w.com | www.936336.com | www.452166.com | www.95666w.com | www.aa0090.com | www.303482.com | www.26878l.com | www.849642.com | www.77802z.com | www.073wy.com | www.773925.com | www.81520f.com | www.3890a.com | www.xinyc8.com | www.36166p.com | www.flcb4.com | www.86267q.com | www.33czt.com | www.318548.com | www.33063.cc | www.401273.com | www.37437.cc | www.290165.com | www.1368o.cc | www.99677y.com | www.ban57.com | www.178993.com | www.f093.com | www.21202x.com | www.900140.com | www.50054z.com | www.901176.com | www.34788p.com | www.862803.com | www.77803z.com | www.641077.com | www.55228f.com | www.755804.com | www.34788x.com | www.369072.com | www.088wy.com | www.50024l.com | www.33598m.com | www.62355.com | www.113669.com | www.cp8002.cc | www.55228l.com | www.192880.com | www.ch8966.com | www.50064w.com | www.186126.com | www.924570.com | www.00711.cc | www.54400z.com | www.401271.com | www.fh7557.com | www.60007f.com | www.81233l.com | www.809215.com | www.679by.com | www.83033w.com | www.310615.com | www.809215.com | www.15355q.com | www.60007k.com | www.401275.com | www.cp3136.com | www.126xc.com | www.91233z.com | www.072211.com | www.cjcp600.com | www.le05.com | www.076wy.com | www.15355g.com | www.bxcp3.com | www.396477.com | www.23040.com | www.okw0.com | www.c5884.com | www.fh17.com | www.gen08.com | www.3126x.com | www.50788c.com | www.78949b.com | www.129029.com | www.335284.com | www.312180.com | www.560161.com | www.612110.com | www.818827.com | www.hy0038.com | www.011ac.com | www.669by.com | www.9155c.cc | www.910xj.com | www.w984.com | www.845755.com | www.810872.com | www.796933.com | www.631259.com | www.560702.com | www.340477.com | www.186769.com | www.99677c.com | www.50051a.com | www.86267k.com | www.12455q.com | www.5666hc.com | www.hqcp5.com | www.763526.com | www.508433.com | www.239544.com | www.87668d.com | www.66332m.com | www.68568r.com | www.9356z.com | www.11csj.com | www.810525.com | www.545669.com | www.160886.com | www.83993q.com | www.8816s.com | www.c300.biz | www.389044.com | www.39957c.com | www.84577.com | www.hf5887.com | www.578411.com | www.77210j.com | www.23636n.com | www.hm7388.com | www.501203.com | www.50074b.com | www.0014s.com | www.le33.cc | www.66653w.com | www.5522a.cc | www.572539.com | www.66652e.com | www.5522u.cc | www.530255.com | www.60108o.com | www.5666hc.com | www.570477.com | www.15355i.com | www.ya499.com | www.237399.com | www.41518l.com | www.881809.com | www.54400d.com | www.hjin1.com | www.181599.com | www.5086z.com | www.567610.com | www.81233k.com | www.901582.com | www.39957d.com | www.963063.com | www.50077c.com | www.hx6627.com | www.68682c.com | www.aa0090.com | www.60007o.com | www.914979.com | www.00840b.com | www.655021.com | www.15355g.com | www.452807.com | www.5091d.com | www.216880.com | www.gai31.com | www.50080l.com | www.208780.com | www.50052b.com | www.335021.com | www.66ffs.com | www.50026u.com | www.762918.com | www.89969.cc | www.52303p.com | www.lcw997.com | www.9356a.com | www.83993r.com | www.904817.com | www.54844.com | www.81233w.com | www.810575.com | www.8039i.com | www.60108z.com | www.336766.com | www.hcjt8.com | www.33588d.com | www.84499b.com | www.631027.com | www.ya044.com | www.36787j.com | www.61655z.com | www.440343.com | www.889938.com | www.2373r.com | www.99677x.com | www.196509.com | www.710930.com | www.kc37.com | www.065wy.com | www.50788c.com | www.43818z.com | www.178615.com | www.517411.com | www.911209.com | www.fh3993.com | www.3416v.com | www.57578d.com | www.50064i.com | www.055972.com | www.355911.com | www.608115.com | www.802733.com | www.976616.com | www.hj7776.com | www.an966.com | www.34czj.com | www.bxcp3.com | www.000ac.com | www.3478r.cc | www.063wy.com | www.065wy.com | www.089wy.com | www.500pt.com | www.636by.com | www.4tdc.com | www.923076.com | www.870933.com | www.689477.com | www.596960.com | www.602452.com | www.400662.com | www.hcw823.com | www.98528e.com | www.54400f.com | www.83033h.com | www.29178c.com | www.8113.cc | www.zcwf1.com | www.897030.com | www.589744.com | www.348077.com | www.99677c.com | www.26163o.com | www.8499w.com | www.hx6693.com | www.rcw789.com | www.297277.com | www.66376t.com | www.32123t.com | www.bang | www.591029.com | www.95333w.com | www.60007t.com | www.8000hc.com | www.709337.com | www.150928.com | www.71399w.com | www.99jth.com | www.607265.com | www.80075n.com | www.57022.cc | www.729987.com | www.89894z.com | www.29277q.com | www.917963.com | www.177249.com | www.00840k.com | www.858399.com | www.81678o.com | www.3416j.com | www.607335.com | www.33997r.com | www.yi328.com | www.330865.com | www.33598z.com | www.901187.com | www.52303b.com | www.33gpc.com | www.234827.com | www.03500w.com | www.591411.com | www.80075m.com | www.785579.com | www.50074f.com | www.c5823.com | www.81233v.com | www.jx68.com | www.77801t.com | www.hj9668.com | www.73166a.com | www.c528.vip | www.33598u.com | www.809387.com | www.07163t.com | www.691307.com | www.50788c.com | www.586960.com | www.89979.cc | www.195880.com | www.087wy.com | www.71233d.com | www.929533.com | www.77801z.com | www.602952.com | www.99431.cc | www.089859.com | www.983003.com | www.00840f.com | www.514577.com | www.0014z.com | www.60123w.com | www.645477.com | www.3207.com | www.32123m.com | www.591032.com | www.588yc.com | www.32123i.com | www.500871.com | www.hc5859.com | www.54968f.com | www.181599.com | www.809215.com | www.58677.cc | www.50026w.com | www.550264.com | www.qmkl2.com | www.41518y.com | www.83993m.com | www.810716.com | www.679by.com | www.73166k.com | www.83993b.com | www.599581.com | www.c4527.com | www.9889hc.com | www.07163f.com | www.035069.com | www.502135.com | www.770490.com | www.gy11.com | www.656by.com | www.45258.cc | www.52072s.com | www.49956x.com | www.98528h.com | www.309388.com | www.566677.com | www.808466.com | www.974688.com | www.cly6.com | www.yi765.com | www.3479v.com | www.37193.cc | www.62500.cc | www.26299n.com | www.50732g.com | www.66653r.com | www.77802m.com | www.77803m.com | www.81233m.com | www.79520c.com | www.83033y.com | www.77114l.com | www.77803r.com | www.07163t.com | www.88266h.com | www.36166g.com | www.66376hh.com | www.97655j.com | www.51331h.com | www.11554.cc | www.055aa.cc | www.tj52.com | www.818827.com | www.595477.com | www.375781.com | www.xinyc2.com | www.81520k.com | www.33598r.com | www.52303g.com | www.5086f.com | www.11cmc.com | www.912481.com | www.577837.com | www.178739.com | www.61655e.com | www.51515x.com | www.2934q.com | www.hm2555.com | www.208780.com | www.278207.com | www.131763.com | www.95222w.com | www.5095l.com | www.979683.com | www.542511.com | www.77803c.com | www.50024q.com | www.11clf.com | www.745126.com | www.202437.com | www.83993s.com | www.588yc.com | www.721662.com | www.153946.com | www.36788g.com | www.c5906.com | www.401274.com | www.36788i.com | www.104ak.com | www.591017.com | www.60108g.com | www.977hf.com | www.622709.com | www.73166i.com | www.2350f.com | www.luck887.com | www.66653c.com | www.m.55xj.vip | www.544559.com | www.00840u.com | www.hr3888.com | www.166125.com | www.8039b.com | www.582477.com | www.96386m.com | www.916270.com | www.71233f.com | www.9889hc.com | www.332760.com | www.8816r.com | www.511079.com | www.50074f.com | www.987443.com | www.ttcp88.co | www.637012.com | www.68568s.com | www.c5615.com | www.66621w.com | www.c189.vip | www.33997k.com | www.889938.com | www.07163e.com | www.701489.com | www.65707w.com | www.570126.com | www.cll168.com | www.327831.com | www.696by.com | www.71399m.com | www.hcw332.com | www.50732r.com | www.346311.com | www.ya160.com | www.36788l.com | www.631799.com | www.3416n.com | www.81678u.com | www.816142.com | www.9928e.com | www.88266g.com | www.960121.com | www.35918c.com | www.312477.com | www.cp7768.com | www.41518y.com | www.040419.com | www.783500.com | www.7777ho.com | www.41518z.com | www.377291.com | www.rcw8866.com | www.9155g.com | www.68682f.com | www.586960.com | www.flff1.com | www.01500w.com | www.66621w.com | www.377503.com | www.896010.com | www.1555hc.com | www.66332f.com | www.77114s.com | www.584611.com | www.949429.com | www.2408e.cc | www.50024r.com | www.68689p.com | www.188727.com | www.587344.com | www.896165.com | www.lqc5.com | www.8000hc.com | www.61233pp.com | www.99677r.com | www.79800a.com | www.193195.com | www.586113.com | www.730678.com | www.cp7777b.com | www.w984.com | www.9889hc.com | www.3552g.com | www.41518g.com | www.86267d.com | www.50024n.com | www.80075p.com | www.129989.com | www.177524.com | www.202423.com | www.316530.com | www.332907.com | www.330605.com | www.506477.com | www.506433.com | www.506586.com | www.382688.com | www.310383.com | www.186759.com | www.040439.com | www.77803n.com | www.50052t.com | www.29277v.com | www.80767h.com | www.60007b.com | www.33997.com | www.055v.cc | www.ya248.com | www.972283.com | www.755804.com | www.506731.com | www.178135.com | www.52072b.com | www.99638m.com | www.9999y.cc | www.h679.com | www.771049.com | www.398518.com | www.081506.com | www.16878r.com | www.7793q.com | www.gczj5.com | www.642977.com | www.207881.com | www.62118a.com | www.33997c.com | www.qml3.com | www.612210.com | www.97655s.com | www.98528g.com | www.cpw | www.810527.com | www.303053.com | www.34788u.com | www.1368t.cc | www.755216.com | www.113438.com | www.60007c.com | www.caim3.com | www.506232.com | www.35155v.com | www.600hc.com | www.602475.com | www.80767q.com | www.5522q.cc | www.710930.com | www.81520v.com | www.3479k.com | www.618477.com | www.55885n.com | www.585hc.com | www.500190.com | www.29277s.com | www.19czj.com | www.338996.com | www.36166q.com | www.833585.com | www.80065e.com | www.068wy.com | www.332950.com | www.bxcp3.com | www.648689.com | www.99638b.com | www.905866.com | www.50080j.com | www.c6092.com | www.80065e.com | www.ya909.com | www.065966.com | www.90egg.com | www.111306.com | www.bxcp3.com | www.130883.com | www.500cd.com | www.101282.com | www.3552r.com | www.505170.com | www.29178h.com | www.433680.com | www.781566.com | www.98528f.com | www.663by.com | www.77801n.com | www.cb7188.com | www.21202n.com | www.652392.com | www.9356a.com | www.217380.com | www.wycp1.com | www.43131m.com | www.670209.com | www.9356f.com | www.062866.com | www.950665.com | www.55885j.com | www.lcw997.com | www.hy5755.com | www.81520m.com | www.351957.com | www.ya002.com | www.91233d.com | www.394211.com | www.fh52.com | www.62118g.com | www.234265.com | www.927836.com | www.9818q.cc | www.57578h.com | www.530391.com | www.fcff4.com | www.33588b.com | www.83993f.com | www.589703.com | www.qj35.com | www.26878b.com | www.81233s.com | www.530781.com | www.xinyc8.com | www.5441h.com | www.16878u.com | www.106507.com | www.558413.com | www.am6543.com | www.2373m.com | www.51331k.com | www.60007v.com | www.163136.com | www.586960.com | www.bxcp66.com | www.8fk.com | www.9149p.com | www.91233h.com | www.66376x.com | www.235387.com | www.586198.com | www.806375.com | www.hf5885.com | www.588yc.com | www.3478y.cc | www.39391.cc | www.50788r.com | www.29277y.com | www.66332u.com | www.83033z.com | www.202341.com | www.338061.com | www.482770.com | www.550294.com | www.576679.com | www.761996.com | www.810620.com | www.859505.com | www.820535.com | www.828165.com | www.895010.com | www.901531.com | www.910882.com | www.843933.com | www.717671.com | www.612212.com | www.533786.com | www.391411.com | www.xinyc1.com | www.117015.com | www.97655n.com | www.62118g.com | www.33588i.com | www.54400h.com | www.cll168.com | www.009ac.com | www.hmfc8.com | www.914901.com | www.667537.com | www.444219.com | www.196509.com | www.73166a.com | www.61655t.com | www.18005.com | www.ac3311.com | www.895010.com | www.397730.com | www.80065f.com | www.50732n.com | www.062wy.com | www.828516.com | www.362322.com | www.80065t.com | www.61233k.com | www.070wy.com | www.745855.com | www.305995.com | www.33598q.com | www.2109h.com | www.wcp8008.com | www.202115.com | www.99677y.com | www.074wy.com | www.621421.com | www.77802z.com | www.9928n.com | www.912481.com | www.336766.com | www.55228c.com | www.c9337.com | www.320055.com | www.80065l.com | www.aa0090.com | www.338082.com | www.68689k.com | www.ch8456.com | www.196091.com | www.26878h.com | www.817824.com | www.77114z.com | www.014ac.com | www.500710.com | www.77801l.com | www.971291.com | www.87668n.com | www.3479a.com | www.526901.com | www.61655s.com | www.808482.com | www.43818c.com | www.c71.cc | www.77210j.com | www.fh3993.com | www.136052.com | www.777hy.cc | www.346918.com | www.9889hc.com | www.395477.com | www.6832s.com | www.370933.com | www.3933t.cc | www.290252.com | www.055cp.cc | www.106596.com | www.3668aa.com | www.193161.com | www.084wy.com | www.90305e.com | www.hw6689.com | www.41518l.com | www.810852.com | www.50080c.com | www.403552.com | www.1035j.com | www.91233t.com | www.177888a.com | www.77114z.com | www.629012.com | www.073wy.com | www.55228a.com | www.685053.com | www.29277g.com | www.099192.com | www.936336.com | www.82636.cc | www.025616.com | www.820155.com | www.7793c.com | www.71399v.com | www.648668.com | www.371s.cc | www.52303y.com | www.560671.com | www.sygj9.com | www.00840o.com | www.362477.com | www.968566.com | www.9155g.com | www.66376t.com | www.550436.com | www.bai84.com | www.50026d.com | www.918356a.com | www.29277f.com | www.54400h.com | www.355018.com | www.961219.com | www.5522d.cc | www.12455t.com | www.178993.com | www.602983.com | www.cp5658.cc | www.2350g.com | www.77801d.com | www.80065l.com | www.348177.com | www.670137.com | www.ck3578.com | www.160wt.com | www.35918s.com | www.00840z.com | www.79520b.com | www.177888.com |