cid = (string.IsNullOrEmpty(typeId) ? null : ( Convert.ToInt32( typeId)) ) 有 @{var typeId = Request.QueryString["cid"]; int? cid; cid = (string.IsNullOrEmpty(typeId) ? null : ( Convert.ToInt32( typeId)) );}( Convert.ToInt32( typeId)) ) 这一块下边出现红线,显示有错,该怎么写因为有个函数里边有个 类型就是 int ?,所以我进行上边转换 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 try cid = string.IsNullOrEmpty(typeId) ? null : (int?) Convert.ToInt32( typeId); 谢谢,我去试试我现在写成 @{var typeId = Request.QueryString["cid"]; int? cid; if (string.IsNullOrEmpty(typeId)) {cid = null;} else {cid = Convert.ToInt32(typeId);} } 网站中的RealPlayer不能播放 IIS 网站无法访问。 asp.net 新闻系统生成静态页 请有经验的朋友帮帮忙 不会调试开源博客CNBlogsDotText,哪位大哥帮帮我? 序列化为XML片段问题,高手们帮忙! 简单问题:使用数据绑定表达式无法正确显示回车 .net中的水晶报表安装部署 asp.net 2.0 编译问题“aspnet_merge.exe”已退出 偶想做个下载系统,各位大侠给点思路! asp 与 asp.net的区别 dropdownlist 页面刷新,保持上次的选项 Treeview 控件使用问题
谢谢,我去试试我现在写成
@{var typeId = Request.QueryString["cid"];
int? cid;
if (string.IsNullOrEmpty(typeId))
{cid = null;}
else
{cid = Convert.ToInt32(typeId);}
}