Hi,
I have text boxes and modalpupextender on the same page, when i click button, modalpopup show and find data in the database and show in the grid on the modal popup.
when i click the row of the grid , get the selected value and fill in the text box on the page. i done all of it. but i could not fill value into text box.
below code is which will get data frome the grid which is on the modalpopup.
if (e.CommandName == "goback")
{
int supplierId = Convert.ToInt32(e.CommandArgument);
GridViewRow row = (GridViewRow)(((Control)e.CommandSource).NamingContainer);
LinkButton lnkbtnSupplierNameSearch = row.FindControl("lnkbtnSupplierNameSearch") as LinkButton;
LinkButton lnkbtnUCodeSearch = row.FindControl("lnkbtnUCodeSearch") as LinkButton;
LinkButton lnkbtnSCodeSearch = row.FindControl("lnkbtnSCodeSearch") as LinkButton;
string supplierName = lnkbtnSupplierNameSearch.Text;
string supplierUniqueCode = lnkbtnUCodeSearch.Text;
string baseCurrency = lnkbtnSCodeSearch.Text;
//TextBox txtSupplierName = (TextBox)Page.FindControl("txtSupplierName");
////TextBox txtSupplierCode = (TextBox)Page.FindControl("txtSupplierCode");
////TextBox txtSupplierCurrency = (TextBox)Page.FindControl("txtSupplierCurrency");
txtSupplierName.Text = supplierName; // cant fill up into the text which is on the same page
txtSupplierCode.Text = supplierUniqueCode;
// cant fill up into the text which is on the same page
txtSupplierCurrency.Text = baseCurrency;
// cant fill up into the text which is on the same page
modalUpdate.Hide();
}
please advice