Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 841195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:45:09+00:00 2026-05-15T05:45:09+00:00

Can someone please help me out? My code for splitting the strings is working

  • 0

Can someone please help me out? My code for splitting the strings is working however, i still need to use the splitted string my page. How can i achieve this? Here’s my current code

    private void SplitStrings()
    {
        List<string> listvalues = new List<string>();
        listvalues = (List<string>)Session["mylist"];
        string[] strvalues = listvalues.ToArray();

        if (listvalues != null)
        {
            foreach (string strElement in listvalues)
            { 
                string[] prods = strElement.ToString().Split("|".ToCharArray());
                string prodName = prods[0].ToString();
                Response.Write(prodName);
            }
        }
    }

link text

how can i replace the response.write with any label or literal? when i tried to use a literal on the code it displays one single string not all of the strings that’s been splitted.

any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:45:10+00:00Added an answer on May 15, 2026 at 5:45 am

    Instead of just assigning the value use the concatenation operator to get all the strings. If your label name is label1 then something like

    label1.Text += prods[0].ToString(); 
    

    will be enough.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 510k
  • Answers 510k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can extend your method by replacing Html.fromHtml(strSample) part which… May 16, 2026 at 4:55 pm
  • Editorial Team
    Editorial Team added an answer Don't mess with the screensaver settings, use SetThreadExecutionState. This is… May 16, 2026 at 4:55 pm
  • Editorial Team
    Editorial Team added an answer I solved it by setting to choice and setting minOccurs… May 16, 2026 at 4:55 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am getting LNK2001 error. The code has been included below. Can someone please
I am very new to RegEx -- so can someone please help me figure
I am pretty new to javascript so I hope someone here can help me
I use this jQuery code to slide up a div over its wraper div
I'm new to boost shared arrays. There is existing code that declares two arrays:
I have used the code request.getHeader(Referer); The code seemed to work fine. But recently
I'm new to JQuery and want to use it to display a simple volume
I'm having this problem with UTF8 string comparison which I really have no idea
I am currently working on Twitter4j for connecting to Twitter API. As with any
I need to change the old Win98 short path names to long path names.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.