Good afternoon.
For some time I've been looking for something about this, but I believe that almost nobody had this kind of problem, so I do not think I can solve it.
I have an Asp .Net Web Forms system that has, for example, the business registration page. In this I do the search of the address through the CEP, via Webservice of the Post Office. Until then, no problem.
Just imagine that for some reason, the zip code was not found. The user will have the option to enter the address manually. But to make it easier, I have the table of states. And in the field UF, I make a search and I bring, through the digitized acronym, the name of the state. It is working properly, through the field's textChanged and autopostback.
By default, in all screens of my system, in addition to searching through textChanged, I also have a search button, which opens a search page, in popup form, where the user can refine the search and find the information you want. In the case of state it is kind of unnecessary, but as this should work for all tables, let's continue with it.
What happens: when the user selects the state in the gridview of the search page, through javascript, I put the chosen value in the corresponding field, acronym, and focus on it, and close the search page, so far I have no problem.
As in the field of the acronym, I put the autopostback, to bring the name of the state, through textChanged, should happen to change the name of the state, but this does not happen. So far so good, because the page did not suffer a submit. The problem now appears. As I focused on the acronym field, even if I change the text back manually, in order to change the state, nothing happens. It looks like the autopostback of the field has lost the function, type, has been disabled. Nothing I do makes this event work. If I cancel, in the case of insertion or change, and try again, the text exchange returns to work correctly, ie it does the search in the table.
The strangest thing is that I can search all the foreign keys, and at no time does the autopostback of the fields stop working, but I just use the search window, which on returning all of them stop. >
I need to bring the description, information, of the selected data, because the user needs to know if he chose the right one, so as the textchanges stop working, depending on the type of information, it may happen that I have to fill several fields related to the search done, starting from the popup window, but in the page itself I already have it implemented. And having to do it again, depending on how much data I have to show to the user, is a lot of work. And these may not even be present in the gridview of the search page.
Can anyone tell me why this happens?
Thank you.