Click here to Skip to main content
15,921,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i m working in asp.net backend using Oracle in my Apps values bind from dataset to dropdown display like ABC-12012000.xml i want to remove (.xml ) and display to Dropdown list in asp.net 4.0
Posted
Comments
ZurdoDev 12-Jul-12 8:14am    
Just remove the .xml in the SQL statement.

1 solution

dropdown display like ABC-12012000.xml i want to remove (.xml ) and display to Dropdown list
If you cannot handle it in query itself, then before binding the datasource table to dropdown, loop though it and set the text as per need.

Try:
C#
foreach(DataRow dr in myDataSourceTable.Rows)
{
   string currentDisplayText = dr["displayColumn"].ToString();
   dr["displayColumn"] = currentDisplayText.Substring(0, currentDisplayText.IndexOf('.'));
}
myDropDown.Datasource = myDataSourceTable;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900