Fix: Checkbox value binding for IsActive field
Fixed checkbox to send proper boolean values: - Added value="true" to checkbox input - Added hidden field with value="false" for unchecked state - When unchecked: sends "false" from hidden field - When checked: sends "true" from checkbox (overrides hidden field) This follows standard ASP.NET checkbox binding pattern. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5552917f0d
commit
33cd7bddbc
@ -38,7 +38,8 @@
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<input name="IsActive" id="IsActive" class="form-check-input" type="checkbox" @(Model.IsActive == true ? "checked" : "") />
|
||||
<input type="hidden" name="IsActive" value="false" />
|
||||
<input name="IsActive" id="IsActive" class="form-check-input" type="checkbox" value="true" @(Model.IsActive == true ? "checked" : "") />
|
||||
<label for="IsActive" class="form-check-label">
|
||||
Active
|
||||
</label>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user