mike55 Posted May 10, 2005 Posted May 10, 2005 Hi, Have added a html checkbox to my asp.net page. How can I directly set the value of this checkbox from my VB.NET code. Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
PWNettle Posted May 10, 2005 Posted May 10, 2005 Assuming you have properly declared the checkbox in your code, and assuming that you're properly setup the control in your .aspx (by setting runat=server and giving the control an 'id' tag) then regardless of whether you're using an ASP.Net Checkbox webcontrol or an HtmlInputCheckbox you would set its 'Checked' property. chkControlName.Checked = True chkControlName.Checked = False Paul Quote
mike55 Posted May 11, 2005 Author Posted May 11, 2005 Yea, I figured out how to call the control and set its value grand. The problem that I am getting is: "Object reference not set to an instance of an object". Let me explain what I am trying to do, I aquired the Janus Web Grid for .NEt from Janusys. This grid allow you to group data according to a specific field. What I was trying to do is insert a checkbox on the top of each group, which would then allow me to select all the checkboxes in that group (that working - used javascript from Janusys). Now I am trying uncheck the checkbox for a particular group if after checking it, i uncheck one of the checkboxes under the group. Any suggestions. Mike55 Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
mark007 Posted May 11, 2005 Posted May 11, 2005 What html are you using to declare the textbox and what code are you using to declare the checkbox in the code behind? Quote Please check the Knowledge Base before you post. "Computers are useless. They can only give you answers." - Pablo Picasso The Code Net
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.