原创 使用OleDbConnection讀取Excel時的Microsoft.Ace.OleDb.12.0異常

使用OleDbConnection讀取Excel文件時,代碼沒問題,編譯時卻報錯:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

原创 Part 63 - mvc 分頁

By the end of this section, the index page should support both search functionality andpagination as shown below.   Ste

原创 Part 86 - ValidationSummary in asp.net mvc

In this video, we will discuss displaying all validation errors at one place using validation summary html helper. A r

原创 @Html.EditorForModel()用法

MSDN上對@Html.EditorForModel()的解釋是Returns an HTML input element for each property in the model, using additional view da

原创 Part 78 - MVC中不同的ActionResult 類型

In this section, we will discuss different types of ActionResult objects that can be returned by an action method. The

原创 Part 60 - ViewStart in asp.net mvc

 To associate a view with a layout file, we have to set Layout property on each and every view. This violates DRY (Don'

原创 C# Selenium 讀取本地Excel文件並測試

  實現效果:選擇本地Excel文件,excel名稱顯示在ComBoBox中,excel內容顯示在DataGridView中,點擊"Send Web to Test" 按鈕,就會進行相關測試。 Form1.cs代碼如下: using Sy

原创 Part 84 - Compare attribute in asp.net mvc

Compare attribute is used to compare 2 properties of a model. Comparing email addresses and passwords is the common use

原创 Part 76 - ValidateInput attribute in mvc 允許文本框輸入html標籤

只需設置ValidateInput屬性爲false,即可允許在文本框輸入html標籤。若需要詳細瞭解,請往下看: This validateInput attribute is used to enable or disable requ

原创 Part 61 - Named sections in layout files in mvc

Let us understand sections in a layout file with an example. Please watch Parts 59 and 60 before proceeding.  At the

原创 Part 82 - Creating custom validation attribute in asp.net mvc

At the moment, any value outside the range of "01/01/2000" and "01/01/2010" for HireDate filed, will raise a validation

原创 使用Selenium的一個簡單程序

步驟 1,創建一個控制檯程序 2,下載selenium-dotnet-driver包,解壓後,有一個net40的文件夾,把裏面的引用添加到步驟1所建的控制檯程序引用中 3,下載geckodriver.exe和phantomjs.exe,並

原创 Part 64 - MVC Sorting 排序

本文的效果是在 Part 62,及63 的基礎上實現的。 實現效果:        1. Name 和 Gender 列必須是可點擊的超鏈接。         2. 點擊 Name 或 Header,就可以實現排序功能, 如果沒有點擊 N

原创 Part 66 - Check及Uncheck所有CheckBox 同時刪除多行數據記錄的實現

實現效果:勾選Name左邊的CheckBox(後面部分簡稱‘它’),則所有CheckBox都會被選中, 再次Unckeck它,所有都不被選中;如果其他所有CheckBox都選中了,Name左邊的CheckBox會自動選中;反之,如果其他的

原创 Part 62 - mvc search 搜索查詢

Let's discuss, implementing search page in an asp.net mvc application. We should be able to search by Employee Name and