Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 5th, 2005, 01:16 AM
Registered User
 
Join Date: Sep 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to anilm001 Send a message via Yahoo to anilm001
Default How do I display values in commas in a textbox or

I have a query , i have a checkedlist box in a session and it fetches data from a table.

when I try to access the checked items in the next page, I get only the first checked value.

I need to get the checked values in this format

Name1,Name2,Name3

I need the commas in my textbox or label control.

Can u please send me a code snippet.

Thanks
Best Regards
Anil Mahadev
http://anilm001.myfreewebs.net

{

Enterprise Data Management Expertise shall be my Goal towards a

Successful Career

}


 
Old October 6th, 2005, 12:28 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

        TextBox1.Text = ""
        Dim i As Integer
        For i = 0 To CheckBoxList1.Items.Count - 1

            If CheckBoxList1.Items(i).Selected Then
                If TextBox1.Text = "" Then
                    TextBox1.Text = TextBox1.Text + CheckBoxList1.Items(i).Text
                Else
                    TextBox1.Text = TextBox1.Text + "," + CheckBoxList1.Items(i).Text
                End If
            End If
        Next






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get and display a data in textbox kakac ASP.NET 2.0 Basics 1 April 20th, 2007 08:12 AM
XSLT issue to add commas to values 2BOrNot2B XSLT 3 October 31st, 2006 12:04 PM
how to display value to textbox tllcll Javascript 1 October 27th, 2005 09:10 AM
display the result of query in textbox. Abhinav_jain_mca ADO.NET 4 August 3rd, 2004 03:34 AM
How to display dataset using textbox RockNRoll ASP.NET 1.0 and 1.1 Basics 1 July 4th, 2003 07:37 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.