Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
August 05, 2009
how to use split in asp.net..
and also i want to know how to use split in dataset values..
(FOR EXAMPLE IN DATASET I HAVE DATES . IN THAT DATE I WANT TO ADD ONLY MONTH IN DROPDOWNLIST)
i want some examples for split..
need ur suggestions..
Posted Date: August 05, 2009 Points: 5
hi friend..you mean String.Split..
simply use the YourString.Split and pass the character to split as parameter.
String s = "Hi, How are You?"
Here i want to split "hi" and "how are you in 2 separate.
The Split returns the string array..So
String s1 = s.Split('',''); //so the string separated with '','' (comma) as the separate character.
So i got the 2 string like the following
String ans1 = s1;
String ans2 = s1;
I think you got the logic. So you can use this for the dates also. First check the separate character and pass as parameter.
If you have String s = "12/10/2009" (dd/mm/yyyy format)
Then you can got the month value from s.Split(''/'')
To post reply
Related Questions Related Questions
How to Split ''abc123''
How To Split Last String
How to perform slideshow in datalist
Split single .gif file into multiple .gif file
Split Tiff file in C#.net
Split JPEG Files in C#.net
Split a String in C#.Net
String split in sql2005
Split function for String in SQL Server
Latest Forum Questions From The Same Category
Slash(/) in Combobox
attaching the report in the web page
How do i get payment status in redirect page using bitpay?
Login with Facebook and Save details in database
Login with facebook account in my website
How to make a nested datalist control?
What class does Icon derive from?
What are the validation controls?
What''s the difference between an interface and abstract class?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend