当前位置:编程学习 > C#/ASP.NET >>

紧急求助:InputBox在VB写的网页中不能用,怎么办啊?


Partial Class _Default
    Inherits System.Web.UI.Page
    Public xAcct As String
    Public xYear As Integer
    Public xPerd As Integer

    Protected Sub btndlgr_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDLGR.Click
        xAcct = InputBox(" ", "请输入账号")
        xYear = InputBox(" ", "请输入年份")
        xPerd = InputBox(" ", "请输入月份")
        SqlDataSource1.ProviderName = "System.Data.Odbc"
        SqlDataSource1.ConnectionString = "Dsn=as400/db2;uid=grn82;pwd=xxxxxxxx"
        SqlDataSource1.SelectCommand = "SELECT CRSG01,CRSG02,CRSG03,CRSG04,CRSG05,LHYEAR,LHPERD,LHDDAT,HHTRNO,LHJNEN,LHJNLN,LHREAS," _
                                     & "       LHLDES,LHJRF1,LHJRF2,LHDREF,LHDRAT,LHCRAT " _
                                     & "FROM v82fsil.gcrl01 left outer join v82fsil.glhl03 on lhian=crian " _
                                     & "left outer join v82fsil.ghhl02 on hhldgr=lhldgr and hhbook=lhbook and hhyear=lhyear and " _
                                     & "                                  hhperd=lhperd and hhjnen=lhjnen " _
                                     & "WHERE left(crsg01,2)||left(crsg02,6)='" & xAcct & "' and lhyear=" & xYear & " and lhperd=" & xPerd & " " _
                                     & "ORDER BY CRSG01,CRSG02,CRSG03,CRSG04,CRSG05"
        GridView1.DataSourceID = "SqlDataSource1"
    End Sub

End Class --------------------编程问答-------------------- 界面这个样子
--------------------编程问答-------------------- 没有加那3行InputBox之前,调试和IE都可以运行

加了之后,调试运行可以,IE不行,出现“Service Unavailable--HTTP Error 503. The service is unavailable.”,并且应用程序池停止
, --------------------编程问答-------------------- 顶一哈 
貌似要用到客户端脚本

只有慢慢看书了 
补充:.NET技术 ,  VB.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,