Hello, i'm a asp beginner and in industrial training.. i got problem in my project to update the checkbox. i had tried many example but doesn't work. Here are some code . please assist me guys.. Thanks lot for your kindness...

<%intChecboxValue = Request.Form("normal_req")
If intChecboxValue = "" Then intChecboxValue = 0%>
<%
normal_req = replace(request(trim("normal_req")),"'","''")
set rs     = server.createobject("ADODB.Recordset")			
SQL        = "SELECT * FROM tbAppIncident where emp_no = '"&emp_no&"'"
rs.open SQL,con%>  
      <td width="4%"><input name="normal_req" id="normal_req" type="checkbox" value="1"<% If rs("normal_req").Value = True Then Response.Write("checked") %>></td>

The problem is, the checkbox doesn't ticked as it was save previous when i want to edit it.

Hi
This might be because you have no space between the " and the checked in line 8.

<td width="4%"><input name="normal_req" id="normal_req" type="checkbox" value="1"<% If rs("normal_req").Value = True Then Response.Write(" checked") %>></td>

And better is to use checked="checked".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.