Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a gridview with a select command. If I select a row, it will transfer the data in the row to the textboxes. Here is my question, if the value of one textbox = 1, then it will make a textbox into visible

Here it goes, this is what I have in mind

in the PageLoad

C#
TextBox1.Visible = true
TextBox2.Visible = false ;


Selected Index Changed
XML
TextBox1.Text = Gridview1.SelectedRow.Cells[1].Text;

is this possible?
XML
if (Textbox1.Text = "1")
{
TextBox2.Visible = "true";
}


Thank you.
Posted
Comments
Dinesh.V.Kumar 19-Feb-14 1:57am    
Yes it is possible...
BeastMode10 19-Feb-14 4:05am    
where will I put this code?
if (Textbox1.Text = "1")
{
TextBox2.Visible = "true";
}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900