|
|
|
start date: Wed, 08 Aug 2007 02:27:01 -0700,
posted on: microsoft.public.dotnet.framework.aspnet
back
| Thread Index |
|
1
Dinu
|
|
2
Alexey Smirnov
|
|
3
Dinu
|
how to get text of a control in itemtemplate of gridview
Hi
how to get text of a control in itemtemplate of gridview and
how can we access and set it properties dynamycally??
Thanks
Date:Wed, 08 Aug 2007 02:27:01 -0700
Author:
|
Re: how to get text of a control in itemtemplate of gridview
On Aug 8, 11:27 am, Dinu wrote:
> Hi
>
> how to get text of a control in itemtemplate of gridview and
> how can we access and set it properties dynamycally??
>
> Thanks
You can use the FindControl() method
Sample code:
foreach (GridViewRow r in GridView1.Rows)
{
string tb = ((TextBox)r.FindControl("TextBox1")).Text;
}
Date:Wed, 08 Aug 2007 02:48:04 -0700
Author:
|
Re: how to get text of a control in itemtemplate of gridview
On Aug 8, 2:48 pm, Alexey Smirnov wrote:
> On Aug 8, 11:27 am, Dinu wrote:
>
> > Hi
>
> > how to get text of a control in itemtemplate of gridview and
> > how can we access and set it properties dynamycally??
>
> > Thanks
>
> You can use the FindControl() method
>
> Sample code:
>
> foreach (GridViewRow r in GridView1.Rows)
> {
> string tb = ((TextBox)r.FindControl("TextBox1")).Text;
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
hi
i have a gridview and a linkbutton in itemtemplate of that gridview,
and the linkbutton is bounded to database.
now what i want is when a user click on linkbutton i want to navigate
accordingly
to the text of linkbutton and i dont want to use select column, so how
can i find that
which linkbutton is clicked??
please help me in this scenario
Thanks & Regards
Date:Wed, 08 Aug 2007 03:10:27 -0700
Author:
|
|
|