views:

104

answers:

0

I am using c# and asp.net webforms and I have an event handler on the code behind of an aspx page that handles a static event of a DisplayToUI Class.

The code i have works like this:-

1) Default.aspx code behind calls the method WebserviceGateway.request()

2) WebserviceGateway.request() makes a method call to the webservice and also makes a method call to DisplayToUI.ShowWarning()

3) DisplayToUI.ShowWarning() fires the static event OutputMessageToScreen()

4) Default.aspx code behind handles the event and should change some text in a text box

The problem i have is that the text in the text box doesn't change, it seems to get set by the event handler but the changes don't seem to stick. If i make the event handler static then the textbox will display the text correctly but only on the first page load, if the page is refreshed at all the text disappears.

This has been puzzling me for some time and any help would be very appreciated.