narasiman rao

narasiman rao

  • NA
  • 519
  • 768.5k

how to validate  

Aug 24 2015 1:15 AM
   In gridview as follows

Compid Companyname Address
Select 1 trom

Gridviewselected index change code as follows
protected void gvcomdet_SelectedIndexChanged(object sender, EventArgs e)
{
      txt_compid.text = gvcomdet.SelectedRow.Cells[1].text.tostring().trim();
      txt_name.text = gvcomdet.SelectedRow.Cells[2].text.tostring().trim();
      txt_address.text = gvcomdet.SelectedRow.cells[3].text.tostring().trim();
}

When i click the select in gridview in textbox gridview selected row will be displayed as follows

Compid                      1            (txt_compid)
Companyname           trom       (txt_name)
Address                      

In address textbox txt_address shows  
i want to validate  in txt_address  textbox   should not be shown. it will be replaced with empty value

for that how can i validate in asp.net using c#. 

Answers (1)