Time of Update: 2018-12-06
方法一: 在GridView的 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onMouseOver", "SetNewColor(this);");
Time of Update: 2018-12-06
經常上tudou網,發現tudou首頁載入圖片的功能很有意思,tudou首頁從"娛樂"這個板塊往下的所有視頻的縮圖並不是在頁面開啟後就載入的,而是當使用者拖動捲軸到了"娛樂"這個板塊,才開始載入圖片的。這樣做的好處當然是如果有使用者不需要查看下面的內容,則免去了下面所有圖片的請求,這對減少伺服器的壓力還是很有協助的。 實現: 其實tudou的實現原理很簡單,
Time of Update: 2018-12-06
function SetCookie(name,value){ var Days = 30; var exp = new Date(); exp.setTime(exp.getTime() + Days*24*60*60*1000); document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();}function getCookie(name) {
Time of Update: 2018-12-06
在Silverlight中怎麼設定啟動頁面,當建立一個Silverliht頁面或項目中都會存在一個App.xaml頁面,這個頁面是Silverlight應用程式檔案,派生於Application類,在一個Silverlight應用程式項目中,必須有一個該檔案,它負責指定應用程式的啟動頁面,以及應用程式的其他設定,當Silverlight應用程式在瀏覽器中運行時,有Silverlight外掛程式負責初始化該類。 Code highlighting produced by Actipro
Time of Update: 2018-12-06
html控制項 :將input元素的autocomplete屬性設定為off可以關閉自動提示 <input type="text" name="name" autocomplete="off">如果所有表單元素都不想使用自動提示功能,只需在表單form上設定autocomplete=off。<form autocomplete="off"> <input type="text" name="name"> <input type="text" name="
Time of Update: 2018-12-06
ashx檔案中使用Session:如果要在.ashx(一般處理常式) 中使用Session如果不改一些資訊的話直接使用context.Session[“uid”]這樣會出現“未將對象引用設定到對象執行個體”就是說值為null。此時的解決辦法就是:1、在命名空間裡匯入:using System.Web.SessionState;2、讓它繼承介面IRequiresSessionState:public class Handler1 :
Time of Update: 2018-12-06
檔案下載: string filepath = Server.MapPath("~/public/file.txt"); FileInfo fi = new FileInfo(filepath); Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name); Response.AddHeader("
Time of Update: 2018-12-06
<html><body><style>#msg_win{border:1px solid #A67901;background:#EAEAEA; width:240px;position:absolute;right:0;font-size:12px;font-family:Arial;margin:0px; display:none; overflow:hidden; z-index:99;}#msg_win .icos{position:absolute;
Time of Update: 2018-12-06
1.winform水晶報表 a.建立一個項目() b.在此項目裡面添加一個資料集檔案DataSet1.xsd c.添加一個報表檔案 CrystalReport1.rpt d.在表單裡面添加一個crystalReportViewer1控制項 e.寫如綁定代碼 DataSet ds = new DataSet(); using (SqlConnection con = new SqlConnection("
Time of Update: 2018-12-06
今天遇到一個需求,把原先表單上需要輸入的一個項隱藏起來,考慮有2種方法:首先說一下頁面配置,這個輸入項是一個TextBox,放在一個Table裡的一個TR下的TD裡,所以可以對TR進行隱藏 一種:把TR的display改為none另外一種:把TR的visible改為false 經過測試,2種方法都可以隱藏裡面的控制項,但是稍有區別:像大多數網上其他文章說的那樣,第一種僅僅是隱藏了控制項,但是html代碼依然產生,也就是我裡面的textBox還是會產生input控制項,而第二種就直接不產生html
Time of Update: 2018-12-06
首先下載一個jquery.validate.js外掛程式 <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Mvc.Validation.Views.Home.Index" %><asp:Content ID="indexContent"
Time of Update: 2018-12-06
1:安裝完飛信2008後,其目錄下有:D:\Program Files\China Mobile\Fetion\VMDotNet\v2.0.507272:把程式放到該目錄(或另起一目錄)3:用飛信來運行程式(這裡就是要記錄,用什麼來運行)可用資訊:通過建立批處理運行就行了。建立一記事本改尾碼名為.bat,如:run.bat裡面放一行代碼:start fetionvm xxx.exe收工。那個start很關鍵,運行後自動結束批出理程式。
Time of Update: 2018-12-06
首先說一下在.Net下如何發送郵件。.Net已經為我們準備好了與發送郵件相關的類,只要直接調用即可,非常方便。下面是我自己寫的一個郵件通知類:public class EmailNotificationService { /// <summary> /// 構造一個郵件通知服務類的執行個體。 /// </summary> /// <param>SMTP伺服器的IP地址</param> ///
Time of Update: 2018-12-06
最近在做網站後台,在網上找了大量的背景模版,覺得還不錯,拿出來給大家分享一哈。。。。 1. 點擊下載 多風格多功能後台系統管理範本 2. 點擊下載 專業銀行結算系統後台模板 3. 點擊下載 超漂亮的電子商務管理平台模板4. 點擊下載 dedecms綠色後台html版5. 點擊下載 一款不錯的網路辦公系統登入頁面6. 點擊下載 網站管理系統後台模板7. 點擊下載 汽車美容連鎖網站管理系統模板8. 點擊下載 網站後台管理系統模板9. 點擊下載
Time of Update: 2018-12-06
view:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ValidationTest.Models.Movie>" %><asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Cre
Time of Update: 2018-12-06
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Web;using System.Collections;namespace ******.WebHelper{ public class FilterText { string FilePath = string.Empty; publ
Time of Update: 2018-12-06
在網站開發過程中,有些耗時、佔用系統資源的操作會期望能夠在比較閒置時間集中處理,這樣就需要用到控制台程式的排程管控。原理:使用windows系統內建的計劃任務進行排程式控制管。源碼分析:ExecutingJob executingJob = new ExecutingJob();//需要自己定義一個CS檔案 executingJob.JobType = ExecutingJob.ORDER_SHIPMENT_INSTRUCTION;//選擇執行哪一個排程
Time of Update: 2018-12-06
<?xml version="1.0" encoding="utf-8" ?><books> <book> <title>Book1</title> <time>1989/06/23</time> </book> <book> <title>Book2</title> <time>1989/06/23</time>
Time of Update: 2018-12-06
1.public class Person {public int ID{ get; set; } public string Name { get; set; } public string Age { get; set; }
Time of Update: 2018-12-06
預存程序:create PROCEDURE pagelist @tablename nvarchar(50),@fieldname nvarchar(50)='*',@pagesize int,--每頁顯示記錄條數@currentpage int,--第幾頁@orderid nvarchar(50),--主鍵排序@sort int,--排序方式,1表示升序,0表示降序排列@rowcount int output,--總記錄數,共有幾條資訊@pagecount int