- 爱易网页
-
ASP.NET教程
- 应该是初级异常,BC30689: 语句不能出现在方法体外,见内
日期:2014-05-18 浏览次数:20516 次
应该是初级错误,BC30689: 语句不能出现在方法体外,见内
我要把表中的数据分行显示到table中,如下:
<script runat= "server ">
'Sub Page_Load(obj As object,e As eventargs)
Dim queryString As String = "select * from workflo2_bumen order by paixu "
Using connection As New OdbcConnection( "DSN=aa;uid=aa;pwd=** ")
Dim command As New OdbcCommand(queryString, connection)
connection.Open()
Dim reader As OdbcDataReader = command.ExecuteReader()
While reader.Read()
response.write(reader.getString(0)& " | "&reader.getString(1) & " <br> ")
response.Write( " <tr> ")
response.Write( " <td align= " "center " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-left:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> <a href= " "huizhi.asp " "> <font color= " "#FFFFFF " "> reader.getString(1) </font> </a> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " <td align= " "right " " nowrap style= " "border-bottom:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 " "> </td> ")
response.Write( " </tr> ")
</script>
<tr>
<td align= "center " nowrap style= "border-bottom:1px dotted #8A9DC6;border-left:1px dotted #8A9DC6;border-right:1px dotted #8A9DC6 "> <a href= "huizhi.asp "> <font color= "#FFFFFF "> reader.getString(1) </font> </a> </td>