1
Answer

Use bool variable

Rowshan Ali

Rowshan Ali

11y
1.2k
1
Hello dear
i m in problem to use bool variable. when i approve a workorder by chacking chekboxb its true . how to use it.
if any body helpme best regurds.
Answers (1)
0
Sandeep Singh Shekhawat

Sandeep Singh Shekhawat

NA 22.4k 12m 11y
suppose you have a checkbox and one button and submit a form on button click with checkbox true or false value according to checkbox checked or uncheck.

create a page which has a checkbox and a button on .aspx page

Student:<asp:CheckBox ID="chkStudent" runat="server" Checked="false" /><br />

    <asp:Button ID="btnSubmit" runat="server" Text="Submit" onclick="btnSubmit_Click" />

 On button click event you want vale of check box checked or unchecked accordingly :

protected void btnSubmit_Click(object sender, EventArgs e)

        {

            bool student = chkStudent.Checked ? true : false;

        }

 
thereafter you can use student variable for fruther working.


Thanks
Sandeep Shekhawat

Accepted