Want make call to javascript function from switch case statment in asp.net mvc:
@select Case imageExistOrNot(this)
Case True
@<a onclick="showCardImage(this)">Show</a>
Case False
@<a>No Image</a>
End Select
And have test JS method:
function imageExistOrNot()
{
return false;
}
showCardImagebut the only js method you have in your question is namedimageExistOrNot. Also you pass in 1 parameter but the method defined takes 0 parameters.... Is there something you are not showing or included by mistake??@select Caseis executed on server-side. If that's the case, then what you are asking is not possible and does not make sense at all.@select Case imageExistOrNot