1. code behide
string ComputeSeniorityLevel(TimeSpan ts)
{
int numberOfDaysOnTheJob = ts.Days;
if (numberOfDaysOnTheJob >= 0 && numberOfDaysOnTheJob <= 1000)
return “Newbie”;
else if (numberOfDaysOnTheJob > 1000 && numberOfDaysOnTheJob <= 4000)
return “Associate”;
else if (numberOfDaysOnTheJob >= 4000 && numberOfDaysOnTheJob <= 8000)
return “One of the Regulars”;
else
return “An Ol’ Fogey”;
}
2. html
<asp:GridView ID=”GridView1″ Runat=”server”
DataSourceID=”employeeDataSource” AutoGenerateColumns=”False”
[...]
body {
margin:50px 0px; padding:0px;
text-align:center;
}
#Content {
width:500px;
margin:0px auto;
text-align:left;
padding:15px;
border:1px dashed #333;
background-color:#eee;
}
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() [...]
Label ID=”LabelDescription”
runat=”server”
Text=’<%# System.Web.HttpUtility.HtmlEncode((string)Eval(”Description”)) %>’
A Permalink is a permanent link which points to a particular blog entry or forum entry. For example the permalink for this blog article is http://csharp-codesamples.com/2009/03/aspnet-permalinks-using-url-rewriting.
This does not mean that a physical page is created for each blog entry. Instead a single page shows the data for multiple blogs articles dynamically based on some query [...]
<!– Paste this code into an external JavaScript file named: dateFormat.js –>
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Oded Arbel :: http://geek.co.il/wp/ */
/**
* Extension of the JavaScript internal Date object to allow various formatting of
* date/time values.
* This implementation was designed to be compliant with the [...]
http://geekswithblogs.net/ranganh/archive/2009/10/01/fileupload-in-updatepanel-asp.net-like-gmail.aspx
Introduction to jQuery in ASP.Net and 10 Advantages to Choose jQuery
http://www.codedigest.com/Articles/ASPNETAJAX/183_Using_JQuery_in_ASPNet_AJAX_Applications_%e2%80%93_Part_1.aspx
More Fun With LINQ – Perform Common Tasks in ASP.NET
http://www.dotnetcurry.com/
http://www.dotnetcurry.com/ShowArticle.aspx?ID=320