Time of Update: 2018-12-05
首先是HttpHandler類的代碼:using System;using System.Collections.Generic;using System.Web;namespace HttpHandler{ public class JPEGHandler : IHttpHandler { #region IHttpHandler 成員 public bool IsReusable { get { return true;
Time of Update: 2018-12-05
發現了一個 ASP.Net的不安全的東西,就是在一個web頁面表示的時候,根據登陸的使用者的許可權的不同,將頁面上的某個按鈕的Enabled屬性設定為false,以限制目前使用者的一些操作,結果這是徒勞的,下面仔細看一下當把一個按鈕的Enabled屬性設定為false時,訪問這個頁面,返回到用戶端的代碼如下<input type="submit" name="btnDelete" value="刪除" id="btnDelete" disabled="disabled"
Time of Update: 2018-12-05
http://blog.csai.cn/user1/36970/archives/2008/32993.html ASP.NET 2.0 C# 寄送電子郵件 TNND....費了我一個晚上的時間(上次在公司是費了我半天的時間都發不了)才成功發送.... ASP.NET
Time of Update: 2018-12-05
一直沒有用asp做過東西,這個是修改一個現有的網站,以前是用asp做的,由於比較緊,沒有換用其他的語言,經過一段時間的忙碌,終於放到公網上了。仍然有些功能沒有做完,有的做完了,但是功能不是很完善。沒有做完的有: 1、炒匯知識。2、法律遵照。3、招聘資訊不完善的有: 1、留言板。2、個人資訊修改。3、頁尾地址:http://www.centuryhuahui.com
Time of Update: 2018-12-05
public static void SendSMTPEMail(string strSmtpServer, string strFrom, string strFromPass, string strto, string strSubject, string strBody){System.Net.Mail.SmtpClient client = new SmtpClient(strSmtpServer);client.UseDefaultCredentials = false;client.
Time of Update: 2018-12-05
直接分析盜鏈原理:看下面用httpwatch截獲的http發送的資料 GET /Img.ashx?img=svn_work.gif HTTP/1.1 Accept: */* Referer: http://www.jb51.net/ Accept-Language: zh-cn UA-CPU: x86 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2;
Time of Update: 2018-12-05
【原文地址】Tip/Trick: Url Rewriting with ASP.NET【原文發表日期】 Monday, February 26, 2007 9:27
Time of Update: 2018-12-05
從零開始學習ASP.NET MVC(一) 開天闢地入門篇Asp.Net Mvc: Model Binding to Simple Types, Complex Types, Collections, Dictionaries, Etc 摘要: 本文主要實驗如何應用Asp.Net Mvc內建功能(DefaultModelBinder)實現簡單類型、複雜類型、集合類型,以及字典類型的自動綁定。Asp.Net Mvc: Model Binding 機制分析 摘要:
Time of Update: 2018-12-05
1、解決Cookie更新滯後的問題 先寫入一個到期的Cookie,再添加一個新的Cookie就OK了。範例程式碼如下所示:protected void btnSearch_Click(object sender, EventArgs e) { //產生條件運算式 string where = bll.GetWhereSql(Int32.Parse(ddlCate.SelectedValue),
Time of Update: 2018-12-05
ASP中使用交易處理ASP中隊資料庫表的操作(INSERT/UPDATE/DELETE),可使用交易處理,並支援多交易處理. 在ASP的資料庫物件連結化物件中,提供了一下屬性: BeginTrans 事務開始 CommitTrans 事務提交 RollbackTrans 交易回復 <% On Error Resume Next ’錯誤發生後繼續處理'Asp中使用事務 Set
Time of Update: 2018-12-05
1.web.config 中需要加入: <httpHandlers> <add verb="*" path="Telerik.RadUploadProgressHandler.aspx" type="Telerik.WebControls.RadUploadProgressHandler, RadUpload.Net2" /> </httpHandlers> <httpModules> <add
Time of Update: 2018-12-05
XML檔案:XMLFile.xml<?xml version="1.0" encoding="utf-8"?><smallfoolsRoot> <poems> <id>1</id> <author>王維</author> <title>竹裡館</title> <content>獨坐幽篁裡,彈琴複長嘯。深林人不知,明月來相照。</content>
Time of Update: 2018-12-05
<html><head runat="Server"><style type="text/css" language="javascript">.tabheader table { border-collapse: collapse; /* for IE */ border-spacing: 0; /* for N6 */}.tabheader table tr td
Time of Update: 2018-12-05
<script type="text/javascript">/* json對象序列化為字串*/function Serialize(obj){ switch(obj.constructor){ case Object: var str = "{"; for(var o in obj){ str += o + ":" + Serialize(obj[o]) +",";
Time of Update: 2018-12-05
using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls;
Time of Update: 2018-12-05
修改Xml文檔中的資料:一:使用XPathNavigator修改xml資料////獲得dom對象XmlDocument doc = new XmlDocument();//載入xml文檔doc.Load(Server.MapPath("~//Xml//Mark.xml"));//擷取XPathNavigator對象XPathNavigator navigator = doc.CreateNavigator();//找到Id屬性等於markValue的節點string path = @"//*[@
Time of Update: 2018-12-05
隨著微軟.NET的流行,ASP.NET越來越為廣大開發人員所接受。作為ASP.NET的開發人員,我們不僅需要掌握其基本的原理,更要多多實踐,從實踐中擷取真正的開發本領。在我們的實際開發中,往往基本的原理滿足不了開發需求,我們更多的要積累一些開發技巧,本文就向大家介紹一些實用技巧,希望對大家的開發有所裨益。1. ~ 的用法一般的情況下,我們是使用./../
Time of Update: 2018-12-05
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="News.ascx.cs" Inherits="News" %><asp:Repeater ID="Repeater1" runat="server"> <ItemTemplate> <li> ·<a href="<%# strurl(Eval("isoutlink").ToString(),Eval(
Time of Update: 2018-12-05
ASP.NET Forms驗證 實現子網域名稱(SubDomain)共用登陸下的缺陷 一、什麼是單點登入 單點登入就是在多個web應用程式中,實現統一登入方式,一但登入了某web應用程式,其它相關聯的web應用程序都無需再次登入,一個地方退出,所有相關聯的web應用程式都退出. 二、通過利用ASP.NET Forms驗證模式 可以實現子網域名稱(SubDomain)共用登陸下的缺陷要利用Asp.NET Form驗證模式實現
Time of Update: 2018-12-05
開發asp.net 程式時最常用的驗證模式就是基於表單的身分識別驗證模式,結合global.asa和webconfig可以快速實現此種機制。籠統的說,該過程是先建一個檔案夾,然後把要保護的頁面放進去,接著設定一下web,config,這樣就完成了保護。如果你要訪問這個檔案夾,就會被強制轉到預先設定的登入頁面,你填上正確的使用者名稱和密碼,提交,系統驗證後,就把你的登陸資訊寫到cookie裡面,這樣你再去訪問那個檔案夾,就可以進去了,因為你的登陸憑證已經儲存到cookie裡面了。