I have a page that has a popup modal window and the modal returns a value to the page and then refreshes it. I need to be able to get the value in the code-behind of the page when it is refreshed but the value of the text-box control that it is returned to is always ""
after refresh.
How can I get the value of the one I returned using JS?
The code is added at a test at the moment as I try to get the value of the textbox which has contents before it is refreshed.
protected void Page_Load(object sender, EventArgs e) {
TranslatePage.ObjectsSetup(Page.Controls, 3);
GetUserInfo();
if (txtCustomerType.Text != "" && txtCustomerType.Text != lblTempCustType.Text) {
SearchCustType(txtCustomerType.Text);
}
SetupControls();
string test;
test = txtCustomerType.Text;
}
I had similar situation but in my case i had DropDown list box which is getting filled with javascript. So to get the selected value after the javascript has been fired to fill the dropdown list, i have used one additional method the get value which is
and to get the value I used
So, all u need to do is to add the method and pass your text box to get its value as,
I am sure, it will work for u