c# - foreach statement (get string values) -


Can someone help me? My code is working to split the string, however, I still need to use the string tied to my page. How can I achieve this? Here is my current code

  Private Zero Splittings () {List & lt; String & gt; Listvalues ​​= new list & lt; String & gt; (); Listvalues ​​= (list & lt; string & gt;) session ["mylist"]; String [] strvalues ​​= listvalues.ToArray (); If (listvalues! = Null) {foreach (Listlars in string strings) {string [] prods = strElement.ToString (). Split ("|". ToCharArray ()); String prodName = prods [0]. Ostring (); Response.Write (ProdName); }}}  

How can I change the reaction with any label or literal? When I try to use a literal code on the code, it does not display a single string, which is divided into all the strings.

Any thoughts?

Instead of specifying a value, use the concurrent operator to get all the strings. If your label name is label 1 then something like

  label1.Text = = prods [0]. Toasting ();  

will suffice.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -