.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

C#, Strucked into a problem. Can i have a solution for this

Posted By: Akash Nair     Posted Date: February 25, 2010    Points:2   Category :C#
Hai,I have pushed multiple data from a single textbox(multiline) with into a varchar(maxfield)SQL Server2005 and using stored procedures to retrieve the data. I retrived the data into a dataset and the data is is divided by small squares(shown in dataset).I want it to be seprated and want to bind it with a combobox,where each item should be seprated and shown singly

Author: Venkat             
Posted Date: February 25, 2010     Points: 5   

Hi Akash,

You can use Split method string to split small Square and get the array of string

for eg

string []myArray  = myDataSet.Table[0].Rows[0][0].ToString().Split("[]".ToCharArray());

Now using foreach loop get each string value and bind to DropDownList

For eg

foreach(string mystr in myArray)
DropDownList.Items.Add(new ListItem(mystr,mystr));

Mark As Answer if this solve your problem
Warm Regards,

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend