Overview
Including Script.aculo.us and others scripts.
Reference
20 Top Script.aculo.us Scripts you can’t live without
這是一場無盡的戰鬥...
Overview
Including Script.aculo.us and others scripts.
Reference
20 Top Script.aculo.us Scripts you can’t live without
Overview
This is a hack for allowing concurrent remote desktop sessions in Windows XP sp3
Reference
Concurrent Remote Desktop Sessions in Windows XP SP2
Enabling Concurrent Remote Desktop Sessions on Windows XP SP3 - Patched file included
Overview
I just get an e-book and find that all of the pages are dead. With some searching I find that the file is blocked by windows.
The solution is to unlock the .chm file. To do this:
Reference
Overview
The code below demonstrate how to use JavaScript to get all the checkbox elements of a particular checkbox list, and then check / unchecked them base on the status of another checkbox (the sender).
This technique is also useful when you want to do other operation (e.g. ensure single selection) to all checkboxes of a checkbox list.
Reference
Check/Uncheck all items in a CheckBoxList using ASP.NET and Javascript
Code Snippet
This code is directly copied from Check/Uncheck all items in a CheckBoxList using ASP.NET and Javascript
function CheckBoxListSelect(cbControl, state)
{
var chkBoxList = document.getElementById(cbControl);
var chkBoxCount= chkBoxList.getElementsByTagName("input");
for(var i=0;i<chkBoxCount.length;i++)
{
chkBoxCount[i].checked = state;
}
return false;
}
Overview
I open form with a default button and a Multi-line ASP.NET text box (text area) in Firefox 3. When I hit "Enter" key in the text area, I expect the text area to start a new line. However, the default button is triggered.
Reference
Overview
By default, Calendar control won't allow you to restrict the selectable date range. However, we can achieve this by doing two things:
Reference
Visual Studio .NET - restrict date range in Calendar - eggheadcafe
Disable calendar day select link - eggheadcafe
Steps
Restrict user from navigating to a month outside the range
To achieve this, we can set the "NextMonthText" and "PrevMonthText" fields of the Calendar control to hide the link navigating to next or previous month.
Code Snippet:
protected void Cal_PreRender(object sender, EventArgs e)
{
if (Cal.VisibleDate.Year > 2009 || (Cal.VisibleDate.Year == 2009 && Cal.VisibleDate.Month >= 12))
{
Cal.NextMonthText = string.Empty;
}
else
{
Cal.NextMonthText = ">";
}
if (Cal.VisibleDate.Year < 2000 || (Cal.VisibleDate.Year == 2000 && Cal.VisibleDate.Month <= 1))
{
Cal.PrevMonthText = string.Empty;
}
else
{
Cal.PrevMonthText = "<";
}
}
Restrict user from selecting a day outside the range
This can be achieved by controlling the "IsSelectable" field in the "onDayRender" event handler of the Calendar.
Code Snippet:
protected void Cal_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date.Year == 2009)
{
e.Day.IsSelectable = false;
}
}
Overview
Repeater control is one of my favorite ASP.NET controls because of its flexibility in UI design. However it lack some useful functions like "Sorting", "Paging" & "Data modification".
Now in ASP.NET 3.5 we have a ListView control which seems to do all of the Repeater's jobs and more. Below are some article talking about ListView control.
Reference
The asp:ListView control (Part 1) - Scott Guthrie