Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 April 28th, 2007, 04:57 AM
Registered User
 
Join Date: Apr 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Pass value

I want to pass the selected checkboxlist values to the another page Textbox with comma separator,

 
Old April 30th, 2007, 02:18 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

Well you can retrieve the values of checkbox, & can fetch the value from another page using either querystring or from session, an example as below:

string sValues = string.Empty;
            for (int i = 0; i <= chk.Items.Count - 1; i ++ )
            {
                if (chk.Items[i].Selected)
                {
                    sValues += chk.Items[i].Value + ",";
                }
            }

            Response.Redirect("wrox.aspx?Items=" + sValues.Substring(0,sValues.LastIndexOf(",")));
            Session["Items"] = sValues.Substring(0,sValues.LastIndexOf(","));

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i pass value for GUI? redprawn_89 C# 2005 2 June 3rd, 2008 08:09 PM
pass parameter naeem_ul_hussan Classic ASP Basics 2 August 30th, 2007 11:18 AM
How to pass data ?? aliirfan84 .NET Web Services 9 August 4th, 2007 11:02 AM
pass the value crmpicco HTML Code Clinic 4 February 4th, 2005 05:11 AM





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