When using .checked in a Function, it stops working and generates the following Error. I am currently utilizing Visual Studio 2015. Please assist.
function GenderValidation(sender , e)
{
var male = document.getElementById('RadioButton_male').Checked;
var female = document.getElementById('RadioButton_female').Checked;
if (male == true || female == true)
{
e.IsValid = true;
} else {
e.IsValid = false;
}
}
**
- 0x800a138f - JavaScript runtime error: Unable to get property 'checked' of undefined or null reference
**
This is my Complete code
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="contactus.aspx.cs" Inherits="DVManagmentProject.contactus" %>
<!-- Rest of the original HTML content goes here... -->
This is Debbuger Code
[1]: https://i.sstatic.net/PG8hC.jpg
[2]: https://i.sstatic.net/Jqw0X.jpg
[3]: https://i.sstatic.net/DuaNT.jpg
[4]: https://i.sstatic.net/DrTPP.jpg
[5]: https://i.sstatic.net/1Dhc1.jpg
[6]: https://i.sstatic.net/880dI.jpg
[7]: https://i.sstatic.net/DWQ7D.jpg
[8]: https://i.sstatic.net/LdHXg.jpg
[9]: https://i.sstatic.net/xVXI1.jpg
[10]: https://i.sstatic.net/qC4LA.jpg