Retrieve value from TextBox inside a GridView
-
How can i get the text value of a textbox inside the gridview into a string
-
How can i get the text value of a textbox inside the gridview into a string
What do you mean by
rakeshs312 wrote:
How can i get the text value of a textbox inside the gridview into a string
Can you explain more your case?
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
What do you mean by
rakeshs312 wrote:
How can i get the text value of a textbox inside the gridview into a string
Can you explain more your case?
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
Hi, I have a gridview Gdv1 and inside that i have a TextBox txtname i want to retrieve the value inside the textbox into a string Thanks
-
Hi, I have a gridview Gdv1 and inside that i have a TextBox txtname i want to retrieve the value inside the textbox into a string Thanks
TextBox is inside TemplateField?
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Hi, I have a gridview Gdv1 and inside that i have a TextBox txtname i want to retrieve the value inside the textbox into a string Thanks
Navigate to the row containing TextBox. then, get the string value like:
string str = ((TextBox)Row.FindControl("txtName")).Text;
Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.
-
TextBox is inside TemplateField?
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
yes
-
Navigate to the row containing TextBox. then, get the string value like:
string str = ((TextBox)Row.FindControl("txtName")).Text;
Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.
TextBox txt2 = new TextBox(); txt2 = (TextBox)GridViewName.Rows[2].FindControl("textboxname"); string a = txt2.Text; not working
-
yes
Here is good google result on which you can find solution.[^]
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
TextBox txt2 = new TextBox(); txt2 = (TextBox)GridViewName.Rows[2].FindControl("textboxname"); string a = txt2.Text; not working
Use
RowDataBound
event ofGridview
to find the context item.protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{if(e.Row.RowType == DataControlRowType.DataRow) { TextBox tb = e.Row..FindControl("textboxname") as TextBox; }
}
:cool:
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Simplify Code Using NDepend
Basics of Bing Search API using .NET
Microsoft Bing MAP using Javascript