Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: CheckBoxes in DotNet


Message #1 by Eric Haymaker <ehaymaker@a...> on Mon, 8 Oct 2001 16:29:58 -0500
How do I assign multiple values to an ASP.NET checkbox?



In VBScript I did it like this



<input type="checkbox" value="<%=rs("field1")%><%=rs("field2")%>">



 And  then I would parse it on the next page.





But with the ASP.NET I have been unable to change its value from on.



If I put a value="whatever" in the tag, it becomes a <span> element.



Any ideas?

Message #2 by "Yu, Kevin" <kyu@N...> on Tue, 9 Oct 2001 10:01:32 -0400
try



<asp:checkbox ....>



-----Original Message-----

From: Eric Haymaker [mailto:ehaymaker@a...]

Sent: Monday, October 08, 2001 3:30 PM

To: ASP+

Subject: [aspx] CheckBoxes in DotNet





How do I assign multiple values to an ASP.NET checkbox?



In VBScript I did it like this



<input type="checkbox" value="<%=rs("field1")%><%=rs("field2")%>">



 And  then I would parse it on the next page.





But with the ASP.NET I have been unable to change its value from on.



If I put a value="whatever" in the tag, it becomes a <span> element.



Any ideas?



Message #3 by "Rob Meronek" <rob@m...> on Tue, 9 Oct 2001 10:33:49 -0400
Either that or you could concatenate the two fields at the query level like:



select

	field1,

	field2,

	/*(assuming both are strings - you need to convert to string if not)*/

	field1 + field2 as CheckBoxValue 

from

	blah

where

	blah





Then, your checkbox value would be the field "CheckBoxValue".



-----Original Message-----

From: Yu, Kevin [mailto:kyu@N...]

Sent: Tuesday, October 09, 2001 10:02 AM

To: ASP+

Subject: [aspx] RE: CheckBoxes in DotNet





try



<asp:checkbox ....>



-----Original Message-----

From: Eric Haymaker [mailto:ehaymaker@a...]

Sent: Monday, October 08, 2001 3:30 PM

To: ASP+

Subject: [aspx] CheckBoxes in DotNet





How do I assign multiple values to an ASP.NET checkbox?



In VBScript I did it like this



<input type="checkbox" value="<%=rs("field1")%><%=rs("field2")%>">



 And  then I would parse it on the next page.





But with the ASP.NET I have been unable to change its value from on.



If I put a value="whatever" in the tag, it becomes a <span> element.



Any ideas?






  Return to Index