Solved

adding a attribute value to checkbox?

Posted on 2003-11-13
1
442 Views
Last Modified: 2008-03-17
i am trying to add the following values in code behind to my checkbox. the javascript one works fine, but the value one does not add. can anyone tell me what i am doing wrong?

thanks!

CheckBox1.Attributes.Add("onClick", "journals(this,this.checked)")
CheckBox1.Attributes.Add("value", CType(pjournallabel.Text, Integer) + CType(ejournallabel.Text, Integer))
CheckBox2.Attributes.Add("onClick", "journals(this,this.checked)")
CheckBox2.Attributes.Add("value", ejournallabel.Text)
0
Comment
Question by:trevoray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
naveenkohli earned 500 total points
ID: 9740992
For check box, the "value" attributes is if the box is selected or not.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question