这条线有什么问题? [英] What is wrong with this line?

查看:57
本文介绍了这条线有什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我想显示图像icon-yes.gif如果某个条件为真或图像icon-no.gif如果它是假的。


我有这一行:

< td>< img runat =" server" src =''<%#" .. image /" &安培; IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"" icon-no.gif"%>''>< / td>

我收到此错误

编译器错误消息:BC30455:未为''公共函数IIf'的参数''FalsePart''指定参数(表达式为布尔值,TruePart为对象,FalsePart为对象)作为对象''。


然后我试图将行更改为:

< td>< img runat =" server" src =''<%#" .. image /"& IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"," icon-no .gif"%>''>< / td>


我一直有同样的错误。


有人可以帮助我?我正在使用ASP.NET / VB。


谢谢,

Miguel


解决方案




" Miguel Dias Moura"< we **** @ 2 7NOSPAMlamps.com>aécritdansle message de news:O7 ************** @ TK2MSFTNGP09.phx.gbl ...

你好,


i想要显示图像icon-yes.gif如果某个条件为真或图像icon-no.gif如果它是假的。


我有这一行:

< td>< img runat =" server" src =''<%#" .. image /" &安培; IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"" icon-no.gif"%>''>< / td>


您需要在icon-yes.gif和icon-no.gif之间添加昏迷



问候


< blockquote> Hi NM,

这就是我已经做过的事情。我在第一篇文章中写道。当我这样做时,我收到这条消息:

编译器错误信息:BC30198:'')''预计。


有什么想法吗?


谢谢,

Miguel

" NM" < NM **** @ hotmail.com>在消息新闻中写道:我们************* @ TK2MSFTNGP09.phx.gbl ...




Miguel Dias Moura <我们**** @ 27NOSPAMlamps.com> écritdansle message de news:O7 ************** @ TK2MSFTNGP09.phx.gbl ...

您好,


i想要显示图像icon-yes.gif如果某个条件为真或图像icon-no.gif如果它是假的。


我有这一行:

< td>< img runat =" server" src =''<%#" .. image /" &安培; IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"" icon-no.gif"%>''>< / td>


您需要在icon-yes.gif和icon-no.gif之间添加昏迷



问候


你需要关闭括号,因为你有一个开放式的IIF,但不是关闭的。

Miguel Dias Moura< we **** @ 27NOSPAMlamps.com>在消息新闻中写道:O7 ************** @ TK2MSFTNGP09.phx.gbl ...

您好,


i想要显示图像icon-yes.gif如果某个条件为真,或者图像icon-no.gif如果它是fa的lse。


我有这一行:

< td>< img runat =" server" src =''<%#" .. image /" &安培; IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"" icon-no.gif"%>''>< / td>

我收到此错误

编译器错误消息:BC30455:未为''公共函数IIf'的参数''FalsePart''指定参数(表达式为布尔值,TruePart为对象,FalsePart为对象)作为对象''。


然后我试图将行更改为:

< td>< img runat =" server" src =''<%#" .. image /"& IIF(dataSetPerson.FieldValue(" Author",Container)=" Yes"," icon-yes.gif"," icon-no .gif"%>''>< / td>


我一直有同样的错误。


有人可以帮助我?我正在使用ASP.NET / VB。


谢谢,

Miguel


Hello,

i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it''s false.

I have this line:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif" "icon-no.gif" %>''></td>
I get this error
Compiler Error Message: BC30455: Argument not specified for parameter ''FalsePart'' of ''Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object''.

Then i tryied to change the line to:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif", "icon-no.gif" %>''></td>

I keep having the same error.

Can somebody help me? I am using ASP.NET / VB.

Thank You,
Miguel


解决方案

Hi,

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de news:O7**************@TK2MSFTNGP09.phx.gbl...
Hello,

i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it''s false.

I have this line:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif" "icon-no.gif" %>''></td>

You need to add coma between "icon-yes.gif" and "icon-no.gif"

<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif", "icon-no.gif") %>''></td>

Regards


Hi NM,

that''s what i allready did. I wrote that in my first post. When i do that i get this message:
Compiler Error Message: BC30198: '')'' expected.

Any idea?

Thanks,
Miguel
"NM" <NM****@hotmail.com> wrote in message news:us*************@TK2MSFTNGP09.phx.gbl...
Hi,

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> a écrit dans le message de news:O7**************@TK2MSFTNGP09.phx.gbl...
Hello,

i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it''s false.

I have this line:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif" "icon-no.gif" %>''></td>

You need to add coma between "icon-yes.gif" and "icon-no.gif"

<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif", "icon-no.gif") %>''></td>

Regards


You need to close the parenthesis, because you have an opening paren for your IIF, but not a closing one.
"Miguel Dias Moura" <we****@27NOSPAMlamps.com> wrote in message news:O7**************@TK2MSFTNGP09.phx.gbl...
Hello,

i want to display the image "icon-yes.gif" if a certain condition is true or the image "icon-no.gif" if it''s false.

I have this line:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif" "icon-no.gif" %>''></td>
I get this error
Compiler Error Message: BC30455: Argument not specified for parameter ''FalsePart'' of ''Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object''.

Then i tryied to change the line to:
<td><img runat="server" src=''<%# "..image/" & IIF(dataSetPerson.FieldValue("Author", Container) = "Yes", "icon-yes.gif", "icon-no.gif" %>''></td>

I keep having the same error.

Can somebody help me? I am using ASP.NET / VB.

Thank You,
Miguel


这篇关于这条线有什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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