Setup Requirements

To recreate this sample, make a new C# ASP.NET application within Visual Studio.NET. Then right click References in the Solution Explorer and select Add Web Reference. Then type for the URL and click the Go icon on the right. You should then see a list of methods in the window below. Next change the Web Reference Name to "Saia.RateQuote" and click Add Reference.

Sample Application Code

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace CS
	public class WebForm1 : System.Web.UI.Page
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.Label Label3;
		protected System.Web.UI.WebControls.Label Element;
		protected System.Web.UI.WebControls.Label ResponseCode;
		protected System.Web.UI.WebControls.Label Label5;
		protected System.Web.UI.WebControls.Label Fault;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Message;
		protected System.Web.UI.WebControls.Label Label4;
		protected System.Web.UI.WebControls.Label Label6;
		protected System.Web.UI.WebControls.Label TotalInvoice;
		protected System.Web.UI.WebControls.Label Rate1;
		protected System.Web.UI.WebControls.Label OriginManager;
		protected System.Web.UI.WebControls.Label Label9;
		private void Page_Load(object sender, System.EventArgs e)
			Saia.RateQuote.RateQuote rateQuote = new Saia.RateQuote.RateQuote();
			Saia.RateQuote.Create request = new Saia.RateQuote.Create();

			request.UserID = "Your User ID";
			request.Password = "Your Password";
			request.TestMode = "Y";
			request.BillingTerms = "Prepaid";
			request.AccountNumber = "0123456";
			// Outbound
			request.Application  = "Outbound";
			request.DestinationCity = "LOS ANGELES";
			request.DestinationState = "CA";
			request.DestinationZipcode = "90001";

			/* Inbound
			request.Application = "Inbound";
			request.OriginCity = "LOS ANGELES";
			request.OriginState = "CA";
			request.OriginZipcode = "90001";

			/* ThirdParty
			request.Application = "ThirdParty";
			request.OriginCity = "HOUMA";
			request.OriginState = "LA";
			request.OriginZipcode = "70364";
			request.DestinationCity = "LOS ANGELES";
			request.DestinationState = "CA";
			request.DestinationZipcode = "90001";

			request.Details = new Saia.RateQuote.DetailItem[1];

			request.Details[0] = new Saia.RateQuote.DetailItem();
			request.Details[0].Weight = 100;
			request.Details[0].Class = "50";
			request.Accessorials = new Saia.RateQuote.AccessorialItem[1];

			request.Accessorials[0] = new Saia.RateQuote.AccessorialItem();
			request.Accessorials[0].Code = "LiftgateService";

				Saia.RateQuote.Response response = rateQuote.Create(request);

				if (response.Code != "")
					// Add error handling code in case Saia responds 
					// with an Error Code

					this.ResponseCode.Text = response.Code;
					this.Element.Text = response.Element;
					this.Fault.Text = response.Fault;
					this.Message.Text = response.Message;
					this.TotalInvoice.Text = response.TotalInvoice.ToString();
					this.OriginManager.Text = response.OriginTerminal.Manager;

					// Below is a sample of how to retrieve an array
					// using SOAP objects.

					foreach (Saia.RateQuote.RateDetailItem RateDetailItem in response.RateDetails)
						Rate1.Text = RateDetailItem.Rate.ToString();
				// Add error handling code in case your unable to connect 
				// to the Saia Website.

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
		private void InitializeComponent()
			this.Load += new System.EventHandler(this.Page_Load);



Saia Inc. authorizes the use of these Web Services solely to facilitate the exchange of information between Saia and the customer. Unauthorized use of Saia, Inc. Web Services and information is strictly prohibited. All services may be used for lawful purposes only. No warranty, express or implied, is given relating to the accuracy of content and Saia, Inc. does not accept any liability for error or omission.

Saia Inc. reserves the right to refuse or cancel these services at itís sole discretion. If any terms or conditions are failed to be followed, results constitute grounds for immediate account deactivation.