I want to send the values of 2 text boxes into a button click event so that I can use the values, I presume it can be done of course ?
Using Visual Stidio Express 2012
string tmpOwnerName = (control.FindControl("txtInsertName2") as TextBox).Text;
Error for above line is:- NullReferenceException was unhandled by user code
I am using the above line within my code below to get hold of text box values
My Code:-
protected void Button2_Click(object sender, EventArgs e)
{
OwnersPetsEntities context = new OwnersPetsEntities();
Control control = null;
if (GridView1.FooterRow != null)
{
control = GridView1.FooterRow;
& ...
Go to the complete details ...