.net - The server tag is not well formed error after migrating the code to ASP.NET 4.0 -
i have following piece of code works fine on vs2008 , .net3.0, fails after migrating vs2010 , .net 4.0
i getting error:
server tag not formed
below code, please advice!
<td valign="top" align="center" class="crmtdlabelsinglecolnobold"> <input id="radcustomaudittype" name="<%#"audittype"%>" type="radio" runat="server" value="<%#databinder.eval(container.dataitem, "audit_type_code") & "," & if(databinder.eval(container.dataitem, "custom_audit_survey_id") isnot dbnull.value, databinder.eval(container.dataitem, "custom_audit_survey_id").tostring(), "") %>" "<%# iif(databinder.eval(container.dataitem, "audittype") = true , checkboxcustomaudittype = true, " checked=""true""", "")%>" "<%# iif(checkboxcustomaudittype = false or databinder.eval(container.dataitem, "audit_type_code").indexof("wytws-") <> -1, " disabled=""disabled""", "")%>" "<%# iif(databinder.eval(container.dataitem, "audit_type_code").indexof("wytws-") <> -1, " wytws=""true""", "")%>"/> </td>
you should implement logic c# function in code behind, maybe implementing bound or bind event
.
any way looks need replace double quotes single 1 in name
, value
:
<input id="radcustomaudittype" name='<%# audittype %>' type="radio" runat="server" value='"<%#databinder.eval(container.dataitem, "audit_type_code") && if(databinder.eval(container.dataitem, "custom_audit_survey_id") isnot dbnull.value, databinder.eval(container.dataitem, "custom_audit_survey_id").tostring(), "") %>" "<%# iif(databinder.eval(container.dataitem, "audittype") = true , checkboxcustomaudittype = true, " checked=""true""", "")%>" "<%# iif(checkboxcustomaudittype = false or databinder.eval(container.dataitem, "audit_type_code").indexof("wytws-") <> -1, " disabled=""disabled""", "")%>" "<%# iif(databinder.eval(container.dataitem, "audit_type_code").indexof("wytws-") <> -1, " wytws=""true""", "")%>' />
Comments
Post a Comment