<label >承诺放款后再收费: <%#Eval("ChargeWay").ToString()=="0"?"否":"是"%> </label>
<label >承诺放款后再收费: <%#getValue(Eval("ChargeWay").ToString())%> </label>
后台:
public string getValue(string strValue)
{
if (strValue == "0")
{
return "否";
}
else if(strValue=="1")
{
return "是";
}
return "";
}
方法一:前台调用后台方法传参数
<script>
function Show()
{
var Keys=0;
var a="<%=ButtShow(""+strid+"") %>"; //调用后台变量
}
</script>
public string strid = "000";
public string ButtShow(string strs)
{
return strs;
}