K
kevin
Hi. I'm ripping my hair out.
I'm in VS 2005 Framework 2. I have one website with a gridview with
some template fields. I'm using the footer row to insert records. For
this discussion there is a textbox and a linkbutton in the footer row.
In the click event of the linkbutton an example of what I'm doing is
this:
Dim txt as textbox =
GridView1.FooterRow.Cells(0).FindControl("TextBox1")
then for fun simply:
response.write txt.text
In Website A this works NO PROBLEM and writes out whatever I put in
the textbox after hitting the linkbutton.
I created another website/project and set up the same scenario but I
can't for the life of me get the flipping thing to write out.
Everything is EXACTLY the same. I don't even get the stupid "Object
reference not set to an instance of an object" error. the page just
posts back and does nothing. I can force the error by changing the
FindControl id. ex. findcontrol("textbox1thisiskillingme")
I tried using the RAW control ID but no dice:
Findcontrol("GridView_ctl0_TextBox1")
All on the same server, same root directory, same everything as far as
I can tell.
Any thoughts? Thank you much, KD
I'm in VS 2005 Framework 2. I have one website with a gridview with
some template fields. I'm using the footer row to insert records. For
this discussion there is a textbox and a linkbutton in the footer row.
In the click event of the linkbutton an example of what I'm doing is
this:
Dim txt as textbox =
GridView1.FooterRow.Cells(0).FindControl("TextBox1")
then for fun simply:
response.write txt.text
In Website A this works NO PROBLEM and writes out whatever I put in
the textbox after hitting the linkbutton.
I created another website/project and set up the same scenario but I
can't for the life of me get the flipping thing to write out.
Everything is EXACTLY the same. I don't even get the stupid "Object
reference not set to an instance of an object" error. the page just
posts back and does nothing. I can force the error by changing the
FindControl id. ex. findcontrol("textbox1thisiskillingme")
I tried using the RAW control ID but no dice:
Findcontrol("GridView_ctl0_TextBox1")
All on the same server, same root directory, same everything as far as
I can tell.
Any thoughts? Thank you much, KD