July 2010
M T W T F S S
« Jun    
 1234
567891011
12131415161718
19202122232425
262728293031  

Call webservice from javascript

1.  VS 2005  – create new website with ASP.NET Ajax-Enabled Website , then create   WebService.asmx

using System;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.Script.Services;
/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ScriptService]  // <== [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService {

public WebService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}[WebMethod]

public string HelloWorld() [...]

Sorting Generic List

//Sorting List<> case Item is ListItem
//==============================================
List<ListItem> tempList = new List<ListItem>();

tempList.Insert(0, new ListItem(”————- Vehicle Reports 8″));
tempList.Insert(0, new ListItem(”————- Vehicle Reports 2″));
tempList.Insert(0, new ListItem(”————- Vehicle Reports 4″));

// sort asc
tempList.Sort(delegate(ListItem p1, ListItem p2) {
return p1.Text.CompareTo(p2.Text);
[...]

How to… move from AjaxPro to ASP.NET AJAX PageMethods

How to… move from AjaxPro to ASP.NET AJAX PageMethods

http://weblogs.asp.net/mschwarz/archive/2008/01/08/how-to-move-from-ajaxpro-to-asp-net-ajax-pagemethods.aspx

AJAX For Beginners

What is AJAX? AJAX stands for Asynchronous JavaScript and XML. AJAX uses a combination of Javascript and XML to allow web pages to be updated with new data from the server. It consists of HTML, JavaScript, DHTML, and DOM. The traditional way of processing data between client’s browser and a server was to submit a [...]

javascript css ajax

http://particletree.com/

ajax javascript tip

Chat with ASP.NET and Ajax

http://www.codegod.de/WebAppCodeGod/a-chat-with-aspnet-and-ajax-AID356.aspx

http://www.codegod.de/WebAppCodeGod/a-chat-with-aspnet-and-ajax-AID356.aspx

 

http://particletree.com/features/preloading-data-with-ajax-and-json/

 

Alternate Ajax Techniques, Part 1

http://www.webreference.com/programming/ajax_tech/

Alternate Ajax Techniques, Part 2

http://www.webreference.com/programming/ajax_tech2/

 

http://www.dustindiaz.com/top-ten-javascript/

table sort javascript

http://www.mattkruse.com/javascript/sorttable/#

Description:Â
A common need is to have a table of results or data in the browser and to let the user sort the columns in the browser without needing to go back to the server each time.

This complex script allows that functionality using extensive DHTML.

In older browsers (<4) no sorting will happen, and in Netscape the [...]

tab

http://www.nyokiglitter.com/tutorials/horizontal.html

Random number

randomnumber = Math.round(14 * Math.random());
document.write (randomnumber);

Asynchronous Callbacks and Ajax based UI Experience in Web Applications

Web applications work on the underlying Http protocol and Http is stateless by nature. It uses the Request - Response pattern between the client and the server, to process the logic at the server and present the information in HTML to the client browser. In the case of long running applications, it [...]