2014年12月22日 星期一

網管指令

ping -a IP
nbtstat -a IP
netstat -an

netsh int ip reset resettcpip.txt


netsh winsock reset

2014年12月19日 星期五

MS SQL運用ROW NUMBER耶得區間資料

select * from (
SELECT ROW_NUMBER() OVER(ORDER BY seq DESC) AS Row,
    Material_Cname,lot
FROM Y
) xyz where Row between 100 and 200

2014年12月8日 星期一

網頁Refresh秒數控制

讓網頁Refresh

在網頁開發上有時會讓Client端的頁面定時的自動對Server提出Request,其實這有幾種方法可用,下面我僅列出一個常用的方法,但還是覺得儘量不要有這樣的設計以避免Server過於忙碌而Loading太重了。
在HTML的間加入下面這段標籤內容:
content="10     表示10秒鍾就會Refresh。
url=DirectorTo.aspx"       表示Refresh後要跳到哪一個頁面,若是原來頁面亦可填寫原頁面的位置。

2014年12月3日 星期三

How to Place .NET Windows Forms Control To ASP.NET Web Form

引用
Clearly Drawing in a windows form is easier, accessing data and the way data is displayed are much different, etc...
So to go about this, we will first create a simple Windows application, and I'll show you later on in this tutorial how I will embed it within our page. We will use Windows Control Library instead of a new Windows application.
Open up visual studio, press File-->New-->Project.
Choose "Windows Control Library" and leave the other default settings.
In the control library, insert a label into your form and save your changes.
Make sure you Debug the project because we will need the dll file produced to be used within our web application.
Now close the solution and create a new website.
To do so, press File-->New-->Website. Give your site a name. Mine is web_project.
Now you will need your dll file produced in the previous project, copied to where your asp.net website is.
Usually, you should locate your dll file in "bin" folder of your project. Copy that dll and place it in the root of the website.
Now go back to your website in visual studio, and get the HTML code of the Default.aspx page.
Add the following code within the "form" tag:

<object id="myName"classid="http:WindowsControlLibrary1.dll#WindowsControlLibrary1.UserControl1"
height="70" width="350" VIEWASTEXT/>
Save your changes and Run the site. An alert will be prompted to you asking wether to trust the dll file or not.
Click Run to allow the dll to be launched in Internet Explorer.
This will load the dll file to your web page. It should look something like image below: