ASP.NET遇到问题---空引用异常
来源:互联网 发布:windows 系统修复 编辑:程序博客网 时间:2024/03/29 22:37
Problem2:
下面的红色部分出错
提示:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim i As Integer
For i = 1 To 6
Dim newhl As New HyperLink
Dim newlabel As Label
newlabel.Text = " "
newhl.Font.Size = 12
newhl.Font.Bold = True
newhl.Text = CStr(i)
newhl.NavigateUrl = "?n=" + CStr(i)
newhl.ID = "h1" + CStr(i)
DIV1.Controls.Add(newhl)
DIV1.Controls.Add(newlabel)
Next
If Request("n") = " " Then
Image1.ImageUrl = "~/images/01.jpg"
Else
Image1.ImageUrl = "~/images/0" + Request("n") + ".jpg"
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>图象浏览</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="DIV1" runat="server" style="width: 345px; height: 27px">
</div>
<br />
<br />
<asp:Image ID="Image1" runat="server" Height="200px" /></div>
</form>
</body>
</html>
- ASP.NET遇到问题---空引用异常
- 用户控件引用为空问题 (asp .net)
- ASP.NET遇到问题---onmouseover
- ASP.NET遇到问题---AdRotator
- ASP.NET遇到问题集锦
- asp.net 中css的引用问题
- Asp.net入门,遇到一个小问题
- 搭建asp.net平台遇到的问题
- ASP.NET遇到问题---Global.asax
- ASP.NET遇到问题---Datareader访问数据库
- ASP.NET遇到问题---Loginview控件
- 学习ASP.NET中遇到的问题
- ASP.NET编程中遇到的问题
- ASP.net初调试遇到的问题
- 做asp.net遇到的问题
- 内部异常捕获问题asp.net
- 空指针异常问题
- 当is或as操作符遇到空引用null时的问题
- 同名model导致的Invalid operation for the current cursor position
- 一般的对表单数据验证的javascript代码收集
- 安装SQL Server2000 与 SP4补丁时挂起解决
- 重载++运算符
- 怎么管
- ASP.NET遇到问题---空引用异常
- UNIX 原始Socket 的缺陷
- Eclipe批量更新文件的编码类型
- 如何将程序注册系统服务
- two improvement to the "drop all table with T-SQL" solution
- 一个程序员的成长的六个阶段
- 实现表格交替颜色
- VHDL编程设计技巧
- ASP.NET遇到问题---onmouseover