The way I've done it in the past is
TextBox txt1 = (TextBox)(e.Item.FindControl("NameOfTextBox"));

Where e is type DataGridCommandEventArgs

On May 18, 9:46 pm, ASP_NET <[email protected]> wrote:
> i am trying to access the value entered in the textbox in gridview.
> TextBox ApplicationName = (TextBox)ctlGridView.Rows
> [e.RowIndex].FindControl("txtApplnm");
> above is the code.
> Is it correct? becoz i am still getting value as null.
>
> On May 18, 10:37 pm, Cerebrus <[email protected]> wrote:
>
>
>
> > Oh, really ? You forgot to ask a question !
>
> > On May 18, 4:12 pm, ASP_NET <[email protected]> wrote:
>
> > > i get null when i try to access the textbox value in the grid.
> > >         TextBox ApplicationName = (TextBox)ctlGridView.Rows
> > > [e.RowIndex].FindControl("txtApplnm");
>
> > > ApplicationName.text returns null even though value is added after
> > > gridview edit click.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

Reply via email to