Playing an html class inside an asp.net code

1

I have this code:

<%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/", Eval("DsPathDocumento"), "'") : "style='cursor: default; color:#000000;'" %>>

How would I play this class: class="linkUpload" within the first condition of the ternary expression? That is, I would just like the part after the "?" take this class so that my jquery function could run.

$(document).ready(function () {
        $('.linkUpload').click(function (event) {
            event.preventDefault();
            window.open($(this).attr("href"), "popupWindow", "scrollbars=yes");
        });
    });
    
asked by anonymous 08.01.2015 / 13:50

1 answer

1

I solved it like this:

<strong><a <%# Eval("DsPathDocumento") != null && !String.IsNullOrEmpty(Eval("DsPathDocumento").ToString()) ? String.Concat("href='/UpLoads/", Eval("DsPathDocumento"), "'","class='linkUpload'") : "style='cursor: default; color:#000000;' class='disabled'" %>>
                        <%# Eval("NmTipoDocumento") %>
                    </a></strong>     
    
09.01.2015 / 12:04