Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

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)

Posted

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

Posted

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

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)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...