显示此代码中的错误....需要帮助 [英] shows error in this code ....help required

查看:64
本文介绍了显示此代码中的错误....需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,



我的代码收到错误..



Hi Friends,

am getting error in this code..

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:





< img src =Images /<%Response.Write(Request.QueryString [typ]。ToString());%> .jpgwidth = 200pxheight =60pxalt =/>



请帮助,谢谢...



<img src="Images/<%Response.Write(Request.QueryString["typ"].ToString()); %>.jpg" width="200px" height="60px" alt=""/>

Please help, Thanks...

推荐答案

检查Request.QueryString [typ]在使用它之前是null。



或者尝试处理空值如



Check whether Request.QueryString["typ"] is null before using it.

Or try to handle the null like

Response.Write( Convert.ToString(Request.QueryString["typ"]))


这篇关于显示此代码中的错误....需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆