how can i split sting in textbox in windows application using
c# .net
Answers were Sorted based on User's Feedback
Answer / suresh
DropDown spliting numbers1-100,101-200,...901-1000
ddlnumbers.Items.Clear();
string s=ddlselct.SelectedItem.ToString();
string[] value = s.Split('-');
var v1 =Convert.ToInt32(value[0]);
var v2 =Convert.ToInt32(value[1]);
for (int i = v1; i <= v2; i++)
{
ddlnumbers.Items.Add(i.ToString());
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sasd
string s = in_txt.Text;
string[] a;
// Split string on spaces.
// ... This will separate all the words.
//
string[] words = s.Split(' ');
foreach(string word in words)
{
for (int i = 0; i <= 3; i++)
{
a[i] = word;
}
| Is This Answer Correct ? | 11 Yes | 15 No |
How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?
Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.
Give the code for Handling Mouse Events?
How to use ASP.NET 2.0's TreeView to Display Hierarchical Data?
program for addition of fraction(M/N + P/Q = Y/Z)
. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $
Event Handling in C# Triggering a Button
Code for IP Address Comparison and Conversion in C#?
Coding for Manipulate XML File Data Using C#?
write a Program to copy the string using switch case.
Code for Working with Files under a Directory?
program to reverse the order of digits in a given number of any length.