On Thu, 22 May 2008 07:38:01 -0700 (PDT),
ca****@gmail.com wrote:
>Let me clarify...I'm not trying to learn how to write the Web Service
itself. I have that done already. What I'm needing is to return that
result to a Label without hitting a submit button. You know, kind of
like how the AJAX CascadingDropDown control works.
Use asynchronous client-side javascript methods to handle the
textbox's OnTextChanged event. The script can call the web service
when the Enter key is pressed.
I do not like the idea of calling a web service from client-side
scripting. Too much information is publicly exposed about something
that may need to be a private resource. Instead I would call a page
specifically designed for the task and pass the text in the query
string.
protected void Page_Load(object sender, EventArgs e)
{
string textboxText = Request.QueryString["TextboxText"].Trim();;
string labelText - getLabelText(textboxText);
Response.Clear();
Response.Write(labelText);
Response.End();
}
Doing this keeps the async call within the scope and security of the
session.
>On May 22, 9:19*am, cap...@gmail.com wrote:
>Here's what I'm trying to do. I have a form with a text box called
"accountNum". I have a label under that text box called "orgName".
What I want to do, using Web Services, is when the user enters in
their account number, the Web service connects to the database and
pulls the organization name associated with that account number and
displays the results in the "orgName" label.
Can anyone help or point me in the right direction?
Thanks!
Jeremy