473,378 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to uncheck the checkbox??

Hi..

Expand|Select|Wrap|Line Numbers
  1.  Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
  2.         Dim chkBtndel As CheckBox
  3.         Dim strID As String = ""
  4.         Dim count As Integer = 0
  5.         Dim objdel As ProjectsProcessData = New ProjectsProcessData()
  6.         Dim arrOItems As ArrayList = New ArrayList()
  7.         Dim objdele As TR_Projects = New TR_Projects()
  8.         Try
  9.             For Each dataitem As DataListItem In DLProjects.Items
  10.                 If dataitem.ItemType = ListItemType.Item Or dataitem.ItemType = ListItemType.AlternatingItem Then
  11.                     ' -- Find all the item
  12.                     ' Dim objNewEmp As New FAMS.EntityClass.SVCEmployee
  13.  
  14.                     chkBtndel = dataitem.FindControl("chkRemovePart")
  15.  
  16.                     Dim lblProId As LinkButton = dataitem.FindControl("HyperID")
  17.  
  18.                     If chkBtndel.Checked = True Then
  19.                         strID += lblProId.ToolTip + ","
  20.                     End If
  21.                 End If
  22.  
  23.             Next
  24.  
  25.             strID = strID.Substring(0, strID.Length - 1)
  26.             count = objdele.DeleteProjectsRecords(strID)
  27.  
  28.             If count > 0 Then
  29.                 ShowMessage("Records Deleted Successfully")
  30.                 BindDataList()
  31.             Else
  32.                 ShowMessage("Unable To Request Process")
  33.  
  34.             End If
  35.  
  36.         Catch ex As Exception
  37.  
  38.         End Try
  39.     End Sub
In my datalist, when i try to delete a particular parent record ,it will display an alert message ("unable to request process").the checkbox is still checked after loading the page.Can you pls temme how to uncheck the checkbox??

Regards,
Shravs
May 10 '10 #1

✓ answered by ThatThatGuy

@shravanti88
if you want the checkbox to be unchecked... on page load....
you can manually write the code for this or you can change the CheckBox's ViewState property to False

2 5383
ThatThatGuy
449 Expert 256MB
@shravanti88
if you want the checkbox to be unchecked... on page load....
you can manually write the code for this or you can change the CheckBox's ViewState property to False
May 14 '10 #2
mfaisalwarraich
194 100+
this may help you:

(How can I check the 'Checked' property of a dynamically-created checkbox during the Page_Load subroutine?)

http://stackoverflow.com/questions/1...-page-postback
May 14 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ralph Freshour | last post by:
I have a function that I call to check or uncheck all checkboxes on a form - I use a 'master' checkbox to do this much like hotmail has to check all mail messages - the code works fine if I name my...
3
by: Rich | last post by:
I have a form with 2 check boxes. One of the check boxes is used to specify that the user is a "primary contact." When I check the primary contact box I want a second box for "standard contact"...
2
by: Kufre | last post by:
I need anyone that have done this before to help me. I'm creating a form in Access, in the form has two two checkbox, checkbox A is paid, checkbox B is partial_paid. I want the set the checkbox so...
3
by: Woo Mun Foong | last post by:
I have a checkbox, when enable, allows me to proceed with what I like to do. However, I need to check a certain conditions before I allow the checked box to be checked, if condition is not fullfill...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
2
by: =?Utf-8?B?UmljaA==?= | last post by:
Is there a cancel argument for cancelling if you want to check or uncheck a checkbox? In the checkChanged event of a checkbox I ask the user if they are sure they want to check/uncheck...
12
by: swebster | last post by:
I need to zero in on a specific section of my jsp form during a hide to uncheck the checkboxes in that section. Currently, anything I try either unchecks all checkboxes on the form or doesn't work...
13
by: PhpCool | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the...
1
by: Anuj | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the...
0
by: Chocolade | last post by:
I created a new form and added split container and then on the left side a treeview and on the treeview i added nodes and on the right side of the split container i added a groupbox. Now in the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.