Wednesday, 24. September 2008, 04:54:29
Examples
-
JavaScript
Confirm() - example of using a JavaScript confirm() method. Returns
a boolean true or false.
Ex: <a href="javascript:
confirm('When finished, click OK'); void('')">JavaScript Confirm()
Results
Example - Showing how to capture the results. Returns a
boolean true or false.
Ex: <a href="javascript:
alert('Your choice was: ' + confirm('When finished, click OK') );
void('')">Results Example
If Example - Showing how to capture the results. Returns a
boolean true or false.
Ex: <a href="javascript: if (confirm('Continue?')) {
alert('You chose true') } else { alert('You chose false.') }; void('')">
Confirm OK, then goto URL (uses onclick()) - Confirm, then next web
page - If you press 'OK', then you will launch another web page.
Ex: <a href="ex_confirm_continuepressed.htm" onclick = "if (!
confirm('Continue?')) return false;">
Confirm OK, then popup a new window (uses onclick()) - Confirm, then next web
page - If you press 'OK', then you will launch another web page.
Ex: <a href="ex_confirm_continuepressed.htm" onclick = "if (!
confirm('Continue?')) return false;">
Confirm OK, then goto a URL (uses window.location.href) - Confirm, then next web
page - If you press 'OK', then you will launch another web page.
Ex: <a href="javascript: if (confirm('Continue?')) {
window.location.href='ex_confirm_continuepressed.htm' } else { void('') };
">
Confirm OK, then popup a new window (uses window.open()) - Confirm, then next web
page - If you press 'OK', then you will launch another web page.
Ex: <a href="javascript: if (confirm('Continue?')) {
window.open('ex_confirm_continuepressed.htm'); void('') } else { void('') };
">
The normal html would look like:
blnAnswer = confirm('When finished, click OK')
Monday, 22. September 2008, 18:18:14
Code, ASP.NET
Sort trên List<T>
List<Person> persons = new List<Person>();
persons.Add( new Person("Tom",30) );
persons.Add(new Person("Harry", 55));
// sort in ascending order
persons.Sort( delegate(Person person0, Person person1)
{
return
person0.FirstName.CompareTo(person1.FirstName);
} );
// sort in descending order
persons.Sort( delegate(Person person0, Person person1)
{
return
person1.FirstName.CompareTo(person0.FirstName);
} );
Lọc theo điều kiện trên List<T>
List<MyClass> list = new List<MyClass>();
List<MyClass> subList = null;
int myValue = 0;
subList = list.FindAll(delegate(MyClass record)
{
if (record.MyProperty != myValue)
{ return false; }
return true;
});
Sunday, 21. September 2008, 04:26:22
Software
PDF Password Remover có thể được dùng để giải mã các tập tin Adobe Acrobat PDF được bảo vệ, chẳng hạn như đã được thiết lập mật mã quyền người sử dụng, ngăn cản việc edit(thay đổi), in ấn, chọn đoạn văn bản và hình ảnh(và sao chép chúng vào clipboard), hoặc thêm vào/thay đổi các chú thích và biểu mẫu form.
Tính năng:
• Sử dụng dễ dàng
• Không cần phải cài đặt trước phần mềm Adobe Acrobat
• Thiết lập tựa, tiêu đề, tác giả, keywords cho những tập tin PDF giải mã
• Giãi mã cực nhanh
• Hỗ trợ protocol PDF1.5 (của Acrobat 6.0)
• Thực hiện trên nhiều tập tin từ đường dẫn lệnh
• Hỗ trợ Adobe Standard 40-bit Encryption và Adobe Advanced 128-bit Encryption(cơ chế mã hóa 40 hoặc 128 bit)
• Hỗ trợ Windows 98, ME, NT, 2000 và XP
Download ở đây
Phiên bản PDF Password Remove 3.0 + CrackChúc các bạn thành công!
Wednesday, 17. September 2008, 09:57:30
Code, ASP.NET
Có 1 điều mà các lập trình viên rất hay gặp phải khi lập trình với ASP.Net, đó là phân trang khi sử dụng DataList và Repeater ( còn GridView thì VS 2005 đã hỗ trợ sẵn)
Trong bài viết này tôi giới thiệu với các bạn 1 class library được viết sẵn để sử lý các vấn đề này một cách hết sức đơn giản, khả năng tùy biến của nó cũng là khá hay ( hiện tôi mới biên dịch ra file dll hỗ trợ cho ASP.Net 2.0).
- Cách sử dụng hết sức đơn giản:
1) Tạo 1 website mới trong VS2005
2) Kích chuột phải vào tên Website chọn Add References, chọn đến file dll mà bạn vừa giải nén ra, rồi OK

File kèm theo
CollectionPager.rar
Bước 2: Tại trang .aspx
Thêm đoạn sau vào đầu trang
Code:
<%@ Register TagPrefix="cc1" Namespace="SiteUtils"
Assembly="CollectionPager" %>
- Kéo 1 DataList vào trong trang đó đặt ( ví dụ có tên DataList1)
|
<asp:DataList ID="DataList1" runat="server">
</asp:DataList>
|
|
<CC1:COLLECTIONPAGER id="CollectionPager1" runat="server">
</CC1:COLLECTIONPAGER>
|
Tại trang aspx.cs
Lấy DataSet ds ( lấy dự liệu trong Database)
Code:
CollectionPager1.PageSize = 5; // số items hiển thị trên một trang
CollectionPager1.DataSource = ds.Tables[0].DefaultView;
CollectionPager1.BindToControl = DataList1;
DataList1.DataSource = CollectionPager1.DataSourcePaged;
Chúc các bạn thành công!
siêu tầm
Showing posts 21 -
25 of 38.