0

code in listeners bellow get value from ID #{CheckAll}, I want get value from other attribute.

@Html.X().ResourceManager()

@Html.X().Checkbox()
        .Name("CheckAll")
        .BoxLabel("CheckAll")
        .ID("CheckAll")
        .Checked(false)
        .Listeners(l => l.Change.Handler = @"var checkAll = #{CheckAll}.getValue();
        if(checkAll){            
            #{CheckAll2}.setValue(true);
        }");
pajar
  • 43
  • 2
  • 7

1 Answers1

0

I think your sample should work if you change #{CheckAll} to App.CheckAll and #{CheckAll2} to App.CheckAll2.

Hope this helps.

geoffrey.mcgill
  • 2,375
  • 1
  • 13
  • 21