Pages

Wednesday, July 8, 2009

Using Jquery with ASP.NET simple example.

download source code for this example download

Prerequisites

Download jquery java script library from http://jquery.com/

Steps

1. Create new web site

1. Add jquery java script file(s) to solution.

2. Create new page (ajax_page.aspx) and add following code.

C# ajax_page.aspx.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

public partial class ajax_page : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

string sampleJSONObject =

"{\"FullName\" : \"Dilhan Jayathilaka\", \"Email\" : \"dilhan.jayathilaka@live.com\"}";

Response.Write(sampleJSONObject);

Response.End();

}

}

3. Add javascript to call ajax page using jquery.

default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

<script src="jQuery/jquery-1.3.2.js" type="text/javascript"></script>

<script language="javascript" type="text/javascript">

// JQuery ajax call.

$.getJSON("ajax_page.aspx", function(json) {

$("#txtFullName").html(json.FullName);

$("#txtEmail").html(json.Email);

});

</script>

</head>

<body>

<form id="form1" runat="server">

<div>

<span id="txtFullName" ></span>

<br />

<span id="txtEmail" ></span>

</div>

</form>

</body>

</html>




Open Source JQuery ASP.NET - (DJ - jQuery Web Contorls for ASP.NET)http://dj.codeplex.com/

Wednesday, July 1, 2009

.NET Software Engineers Tool Set

Documentation Tool

The patterns & practices: Documentation Tools project includes a Word 2007 template and tools that you can use to convert Word documents to HTML, Help 1.0 (CHM), and Help 2.0 (HxS). It also includes a tool that helps you manage your table of contents for large documentation sets. You can use these tools to create your own documentation guidance or take existing patterns & practices Word documents, modify the content, and then convert the content to your desired output.
download and read more : http://www.codeplex.com/doctools

Debug View

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

download and read more : http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

Web Debugging Proxy - Http Viewer

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and "fiddle" with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.
Fiddler is freeware and can debug traffic from virtually any application, including Internet Explorer, Mozilla Firefox, Opera, and thousands more.

download and read more : http://www.fiddler2.com/fiddler2/