解决方案 »
- Winform LIstView的问题
- 验证DropDownList,选择的是不是请选择这一项目
- C#小程序,请高手帮下忙,谢谢了!!!
- C/S的EXE程序,设计界面打不开,说未定义变量,但编译和执行都没问题
- 调查一下,大家在使用VS2003还是2005?
- 请教一个简单的循环问题哈~~
- 请教,如何修改 NotifytIcon 控件的 Balloontip 的icon 呢?
- 网络高手们帮帮忙吧[已经问了好久了]
- 写个abc.html内容为<input type=button><textarea>希望按下按钮后,文本框中的文字保存到a.txt怎样实现?(在linux下)
- 高手请进!!怎样才能动态新建Socket对象。
- 有没有合并word文档的方法,但是不调用Microsoft.Office.Interop.Word
- 网页上点击一个按钮后,弹出一个没有关闭按钮的弹出框,如何实现
后台代码在加载页面的时候肯定是先给DropDownList 绑定数据了
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>资源列表</title>
<style type="text/css">
<!
-- #show_zy
{
position: absolute;
width: 220px;
height: 280px;
z-index: 50;
left: 0px;
top: 0px;
backgroud-color: #ffffff;
display: none;
border-width: 2px;
border-style: solid;
border-color: #FBC593;
}
body
{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-- ></style>
</head>
<body> <script type="text/javascript">
var n_id;
function show_up(ty,id,nd)
{document.getElementById("upinfo").src='zy_upload0.aspx?id='+id+'&type='+ty+'&nd='+nd;}
function show_zy( id )
{
document.getElementById("zyinfo").src='myziyuan_show.aspx?id='+id;
document.getElementById('show_zy').style.left=(document.documentElement.clientWidth-500)/2;
document.getElementById('show_zy').style.height=(document.documentElement.clientWidth-700)/2;
document.getElementById('show_zy').style.display='block';
}
</script> <div id="show_zy">
<table width="220" height="250" border="0" align="center" cellpadding="0" cellspacing="1"
bgcolor="#FBC593">
<tr>
<td width="100%" height="25" bgcolor="#FBC593">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="220" align="center">
<font color="black" size="2"><strong>资源详情</strong></font>
</td>
<td>
<div align="right">
<div align="center">
<span style="cursor: hand" onclick="javascript:document.getElementById('show_zy').style.display='none';">
<font size="2">【×】</font></span></div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF">
<iframe id="zyinfo" name="zyinfo" width="220" height="250" frameborder="0" scrolling="no"
src=""></iframe>
</td>
</tr>
</table>
</div>
<table width="220" height="400" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="188" height="280" valign="top">
<div class="ZXWZ">
<div>
<ul>
<%=htm_code%>
</ul>
</div>
</div>
</td>
</tr>
</table>
<form id="form1" runat="server"> <table>
<tr>
<td height="20" align="center" class="gopage">
<div id="mypage" runat="server">
<asp:hyperlink id="up_page" runat="server" font-size="Smaller">上页</asp:hyperlink>
<asp:hyperlink id="next_page" runat="server" font-size="Smaller">下页</asp:hyperlink>
<asp:hyperlink id="last_page" runat="server" font-size="Smaller">尾页</asp:hyperlink>
<font size="2" color="blue">
<%=r_page%></font> /<span style="text-align: left;"><font size="2" color="blue">
<%=t_page%></font> <font size="2">页码:
<asp:dropdownlist id="ys" runat="server" autopostback="True" onselectedindexchanged="ys_SelectedIndexChanged"></asp:dropdownlist>
</font> <font size="2">每页显示 15 条记录,共有<font color="blue">
<%=r_count %></font> 条记录</font> </span>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
报什么错,我试了一下,没报错
--------------
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------未将对象引用设置到对象的实例。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。 堆栈跟踪:
[NullReferenceException: 未将对象引用设置到对象的实例。]
zy_right.Page_Load(Object sender, EventArgs e) in d:\ydschool\zy_right.aspx.cs:167
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.5420; ASP.NET 版本:2.0.50727.5420
你按F5的时候提示你编译出错,你要点"否"看到底哪行代码出错,而不是点"是"让它就那么错误的执行
或者你按F6编译,看到底哪行出错.
有变量没初始化。。调试下