lundi 26 novembre 2018

Vue - V-Bind Disabled Attribute On Webforms Checkbox Control

I have the following code:

JS Vue

new Vue({
    el: '.XXX',
    data: {},
    computed: {
        disableCbInScreens: function () {               
            return true;
        }
    }
});

Webforms

<asp:CheckBox ID="test" runat="server" v-bind:disabled="disableCbInScreens" />
<input ID="test2" v-bind:disabled="disableCbInScreens" type="checkbox" />

Server-Side C#

test.Attributes["v-bind:disabled"] = "disableCbInScreens";

This first checkbox is disabled, the second is not, it's like Webforms is stripping the "V-Bind" from the rendered "input" control. I would like the be able to use Vue's V-Bind for the "asp:CheckBox" control, how can I do this?




Aucun commentaire:

Enregistrer un commentaire