473,388 Members | 1,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Custom Web Service w/C#

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
Jun 27 '08 #1
4 1105
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.

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
Jun 27 '08 #2
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
Jun 27 '08 #3
On May 22, 12:58*pm, Registered User <n4...@ix.netcom.comwrote:
On Thu, 22 May 2008 07:38:01 -0700 (PDT), cap...@gmail.com wrote:
Let me clarify...I'm not trying to learn how to write theWebService
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 thewebservice
when the Enter key is pressed.

I do not like the idea of calling awebservicefrom 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, usingWebServices, is when the user enters in
their account number, theWebserviceconnects 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- Hide quoted text -

- Show quoted text -
Thanks for the reply. I'll give both a try.
Jun 27 '08 #4
This does almost exactly what I want it to do!

http://www.semenoff.dk/en/Code-Corne...avaScript.aspx

On May 22, 12:58*pm, Registered User <n4...@ix.netcom.comwrote:
On Thu, 22 May 2008 07:38:01 -0700 (PDT), cap...@gmail.com wrote:
Let me clarify...I'm not trying to learn how to write theWebService
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 thewebservice
when the Enter key is pressed.

I do not like the idea of calling awebservicefrom 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, usingWebServices, is when the user enters in
their account number, theWebserviceconnects 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- Hide quoted text -

- Show quoted text -
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Uppi | last post by:
I have a setup Project which consists of 7 services. I have created it using Setup and Deployment Project. I have not used installer class. The Problem is that when I select service for custom...
16
by: Bret Pehrson | last post by:
I've converted a non-trivial C++ library to managed, and get the following unhelpful linker error: Assignment.obj : error LNK2022: metadata operation failed (80131195) : Custom attributes are...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
5
by: mtv | last post by:
Hi all, I have the following code: ================================ Webservice side: public class MyWS: WebService { private myLib.DataObject curDataObject;
6
by: kbs | last post by:
Hi, I'm looking for some good examples that illustrate how to code a web service that exposes a custom collection so that the properties of the collection are accessible on the client without...
12
by: Noel | last post by:
Hello, I'm currently developing a web service that retrieves data from an employee table. I would like to send and retrieve a custom employee class to/from the webservice. I have currently coded...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
3
by: =?Utf-8?B?R3JhaGFt?= | last post by:
I've added 2 tracking services to the wf runtime; one is the standard SqlTrackingService: trackingService = new SqlTrackingService(<trackingConnectionString>); <workflow...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Actually, my installer package is not for a Windows Service, but for a WinForms application. Well, it is kind of both: this is a multi-project solution with its main target being a WinForms...
1
by: asharda | last post by:
I have a custom property grid. I am using custom property grid as I do not want the error messages that the propertygrid shows when abphabets are entered in interger fields. The custom property...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.