Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
as i am new to asp.net
i am having an gridview with an TemplateField textbox whose textmode="time"
now i need to save the value of textbox to database on button click

i am using
TextBox intime = (GridView1.Rows[i].Cells[3].FindControl("txtintime") as TextBox);

this code but at run time it is having an empty string "" in intime.text; can anyone help me out

What I have tried:

i am using
TextBox intime = (GridView1.Rows[i].Cells[3].FindControl("txtintime") as TextBox);

or

string me = Convert.ToDateTime(intime.Text).ToShortTimeString();

this code but at run time it is having an empty string "" in intime.text; can anyone help me out
Posted

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