TextBox in Gridview

hi, i want to capture the text entered in the Textbox in gridview a

Page 1 of 1

1 Replies - 1744 Views - Last Post: 16 December 2008 - 04:06 PM Rate Topic: -----

#1 suhaibayyubi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-December 08

TextBox in Gridview

Post icon  Posted 16 December 2008 - 12:02 PM

code that i am using ::

protected void Reply_Click(object sender, EventArgs e)
    {

        foreach (GridViewRow x in GridView1.Rows)
        {
            TextBox TxtVar = new TextBox();
            TxtVar = (TextBox)x.FindControl("TextBox1");
            TxtVar.Text = TxtVar.Text.Trim();
        }



Mod Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: TextBox in Gridview

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1632
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: TextBox in Gridview

Posted 16 December 2008 - 04:06 PM

Are you receiving any errors? Does this code not work that way you intended it? When asking for help there are a couple items that are vital in order for someone to properly help you:

  • Post the code you're having problems with (DONE)
  • Post the exact error you're receiving, if you are receiving one
  • If no error explain what the code is doing versus what you want it to do
  • Post your question in the body of your post, not the description field

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1