Click here to Skip to main content
15,891,850 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hey every one this is my code
C#
Object dt = (Object)gwList.Rows[i].FindControl("Start Date");
            string asa =dt.ToString();

this code not convert dt value in string please help me.....
Posted

Object dt = (Object)gwList.Rows[i].FindControl("Start Date");

I think u r making mistake in name of control "Start Date". It may be "Start_Date"
 
Share this answer
 
Comments
Arsalaan Ahmed 26-Jul-13 6:48am    
No Brother i am not mistake in name of control...
dt recieve value from findcontrol method... i want to convert this dt into string but it is not converting..........
Prashant Kothale 26-Jul-13 7:04am    
then try this...
string asa = Convert.toString(dt);

and if it also not work then tell me the error..
Arsalaan Ahmed 26-Jul-13 7:11am    
if i convert the string so this asa value is System.Web.UI.WebControls.Label
Prashant Kothale 26-Jul-13 7:23am    
Try this...
string asa =dt.Text.ToString();
Please use Convert.toString(dt);
 
Share this answer
 
Comments
Arsalaan Ahmed 26-Jul-13 6:03am    
i also use Convert.ToString(dt) but it is no Convert dt into string....

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