---错误-----------------------------------------
编译器错误信息: CS0246: 找不到类型或命名空间名称“Container”(是否缺少 using 指令或程序集引用?)---.aspx文件-----------------------------------------<img name="" src="<%=xb_img(DataBinder.Eval(Container.DataItem,"m_sex"))%> ">---.aspx.cs文件----------------------------------------- //显示 男女头像
public string xb_img(string sex)
{
if (sex.Trim() == "男")
{
return "images/boy.gif";
}
else
{
return "images/girl.gif";
}
}
------------------------------------
<img name="" src="<%#Container.DataItem,"m_sex")%> ">这样是能得到值
<img name="" src="<%=xb_img("男">">
这样运行也是正确
编译器错误信息: CS0246: 找不到类型或命名空间名称“Container”(是否缺少 using 指令或程序集引用?)---.aspx文件-----------------------------------------<img name="" src="<%=xb_img(DataBinder.Eval(Container.DataItem,"m_sex"))%> ">---.aspx.cs文件----------------------------------------- //显示 男女头像
public string xb_img(string sex)
{
if (sex.Trim() == "男")
{
return "images/boy.gif";
}
else
{
return "images/girl.gif";
}
}
------------------------------------
<img name="" src="<%#Container.DataItem,"m_sex")%> ">这样是能得到值
<img name="" src="<%=xb_img("男">">
这样运行也是正确
什么错我给忘了,下午回家把错 考过来再贴上忘了说一下,我用的是vs2002 呵呵!
http://www.obai.net/download/index.html
{
string Connection=System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"];
SqlConnection con=new SqlConnection(Connection);
SqlCommand cmd2=new SqlCommand("select count(sortid) from Info where sortid=52",con);
try
{
int count=Convert.ToInt32(cmd2.ExecuteScalar());
if (count>0)
{
return count;
}
}
catch
{
} }我的是写这样,不过运行提示说
webform1.sortcount(int);并非所有的代码路径都返回值,这个是怎么样解决呢?
create procedure member_guangmingbang_show
asselect top 25 * from member,member_guangmingbang where datediff(day,getdate(),dateadd(day,g_day_num,g_time))>=0
and member.m_id=member_guangmingbang.m_id and g_shenhe=1 order by newid() desc
我回来了,这是我的错误 ,前台代码还有 我写的存储过程看看倒底是哪错了?