0

Hy,
I have created a webservice (asmx) which has some webmethods. In same project i also have a webpage (aspx) with some multiline texboxes
which i want to use as log output from webmethods.
If i call a webmethod from another prorgram i want to display in the textboxes the oputput of that method. How can i do that? I can populate the textbox but only from the page. The webservice doesn't write anything to it.
I have made a static reference to the webpage and made the textbox public.

public static MainForm instance { get; private set; }

protected void Page_Load(object sender, EventArgs e)
{
    instance = this;
}

And I can access it from the asmx file and set the text property but i can't see any output on the page.

Thanks

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by __avd
0

You can't save the reference of Page (Read the MSDN about asp.net page life cycle). You need to use Session/Cookie/ViewState (State Management) to persist the data.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.