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
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