登录
首页 » C# » asp.net 做的 blog程序源码下载

asp.net 做的 blog程序源码下载

于 2013-11-29 发布
0 72
下载积分: 1 下载次数: 0

代码说明:

asp.net 做的 blog程序源码下载

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • asp.net防刷新(F5) 禁止重复提交 实例(附完整源码)
    实现了用户操作时 刷新导致的重复操作问题。 实现原理如下:   使用一个上下文唯一的票据号,该票据号随页面提交或回发而递增,每当用户与服务器端交互时,代码会提取上次的票据号码并与当前票据号码比较,如果当前票据大于上次的票据,则是提交或回发,否则则识别为刷新。     这种方式会用到HttpMoudel,并在其中操作Session。   使用方法如下:   1、引入dll MsdnExt 压缩包中有2.修改web.config,在 添加以下item:               其中“MsdnModule”是一个名字, “Msdn.RefreshModule”是“Msdn”下的“RefreshModule”类型,“MsdnExt”是程序集的名字 3.引入命名空间 using Msdn; 并修改页面类继承Msdn.Page 4.使用代码  代码:  protected void Button1_Click(object sender, EventArgs e) { if (!IsPageRefresh) Response.Write("按钮事件"); else Response.Write("页面刷新");TrackRefreshState();} MSDNPage.cs 核心代码如下:using System;using System.Web.UI;using System.Web;using System.Text;namespace Msdn{ public class Page : System.Web.UI.Page { #region Constants // *********************************************************** // Constants public const string RefreshTicketCounter = "RefreshTicketCounter"; private const string SetFocusFunctionName = "__setFocus"; private const string SetFocusScriptName = "__inputFocusHandler"; // *********************************************************** #endregion // *********************************************************** // Ctor public Page() { m_focusedControl = ""; // Register a PreRender handler this.PreRender = new EventHandler(RefreshPage_PreRender); } // *********************************************************** // ************************************************************** // Indicates if the page is being viewed in response to F5 hit public bool IsPageRefresh { get { object o = HttpContext.Current.Items[RefreshAction.PageRefreshEntry]; if (o == null) return false; return (bool) o; } } // ************************************************************** // ************************************************************** // Increase the internal counter used to generate refresh tickets public void TrackRefreshState() { InitRefreshState(); int ticket = Convert.ToInt32(Session[RefreshTicketCounter]) 1; Session[RefreshTicketCounter] = ticket; } // ************************************************************** // ************************************************************** // Set the control with the input focus public void SetFocus(string ctlId) { m_focusedControl = ctlId; } // ************************************************************** #region Private Members // ************************************************************** // Create the hidden field to store the current request ticket private void SaveRefreshState() { int ticket = Convert.ToInt32(Session[RefreshTicketCounter]) 1; RegisterHiddenField(RefreshAction.CurrentRefreshTicketEntry, ticket.ToString()); } // ************************************************************** // ************************************************************** // Ensure that the ticket counter is initialized private void InitRefreshState() { if (Session[RefreshTicketCounter] == null) Session[RefreshTicketCounter] = 0; } // ************************************************************** // ************************************************************** // Handle the PreRender event private void RefreshPage_PreRender(object sender, EventArgs e) { SaveRefreshState(); AddSetFocusScript(); } // ************************************************************** // ************************************************************** // Add any script code required for the SetFocus feature private void AddSetFocusScript() { if (m_focusedControl == "") return; // Add the script to declare the function // (Only one form in ASP.NET pages) StringBuilder sb = new StringBuilder(""); sb.Append(""); sb.Append("function "); sb.Append(SetFocusFunctionName); sb.Append("(ctl) {"); sb.Append(" if (document.forms[0][ctl] != null)"); sb.Append(" {document.forms[0][ctl].focus();}"); sb.Append("}"); // Add the script to call the function sb.Append(SetFocusFunctionName); sb.Append("(); sb.Append(m_focusedControl); sb.Append();"); // Register the script (names are CASE-SENSITIVE) if (!IsStartupScriptRegistered(SetFocusScriptName)) RegisterStartupScript(SetFocusScriptName, sb.ToString()); } // ************************************************************** #endregion #region Private Properties // *********************************************************** // Private properties private string m_focusedControl; // *********************************************************** #endregion }}  
    2021-03-16 17:39:21下载
    积分:1
  • C#简体繁体转换(附类库)
    实例截图 核心代码
    2021-09-10 00:30:58下载
    积分:1
  • 字符串加密与解密.
    C#字符串加密与解密.
    2013-10-31下载
    积分:1
  • c# 设置程序开机运行 代码
    c# 设置程序开机运行 代码
    2014-01-03下载
    积分:1
  • 二维表
    二维表
    2013-07-01下载
    积分:1
  • winform 抽奖程序源码
    winform 抽奖程序源码
    2014-01-02下载
    积分:1
  • EzReport Build 1.0 (DLL代码)
    在征询建议的基础上进行了补全修改,正式写为DLL,可以完成基本的报表定制、打印功能。在程序设计中,很多时候报表不需要那么庞杂的功能,一些小程序的数据库报表只需要简单处理,就没必要安装FastReport、Crystal Reports、DevExpress等庞大组件了。由于为前面征询意见的补全,所以不需分数。此程序代码可优化、功能可添加,自行完善修改。1、调用方式:将EzReport_Build.dll添加到引用中,将fontawesome-webfont.ttf字库文件放置在一起private void button1_Click(object sender, EventArgs e){    Form_Desing.Initialize_Design();}即可,也可将Preview.cs、Form_Desing.cs中的private PanelEx修改为public PanelEx,在你的Form中直接嵌入调用,比如打印、预览比例等函数有些已设置为public,也可将需要的函数和组件设为public直接调用。数据库定义在:Define_DataLink.cs绘制定义在:Draw_Function.cs报表组件、界面颜色等定义在:Define_Global.cs界面等其他附属在ui文件夹2、 打印模式设置dpi为96,SetResolution(96, 96);相对应dpi打印纸张类型:public static string[] page_types = new string[24] {            "A0","A1","A2","A3","A4","A5","A6","A7",            "B0","B1","B2","B3","B4","B5","B6","B7",            "C0","C1","C2","C3","C4","C5","C6","C7"        };以及自定义纸张(单位设置为毫米)换算公式为:(int)Math.Floor(int.Parse(input_def[0].textBox.Text) * 3.779527559055118)相对应纸张大小(毫米)public static string[] page_size = new string[24] {"841×1189","594×841","420×594","297×420","210×297","148×210","105×148","74×105","1000×1414","707×1000","500×707","353×500","250×353","176×250","125×176","88×125","917×1297","648×917","458×648","324×458","229×324","162×229","114×162","81×114"        };对应像素为:public static string[] page_pixel = new string[24] {"3178×4493","2245×3178","1587×2245","1122×1587","793×1122","559×793","396×559","279×396","3779×5344","2672×3779","1889×2672","1334×1889","944×1334","665×944","472×665","332×472","3465×4902","2449×3465","1731×2449","1235×1731","865×1224","612×865","430×612","306×430"        }; 按照ISO标准纸型、尺寸设置。打印支持选项:  3、快捷键Ctrl 上、下、左、右可移动组件Shift 上、下、左、右调整组件大小Alt V 粘贴、Alt C复制、等,在报表组件上点击右键,菜单中可看见或在报表栏目空白处点击右键。4、 其余可参见代码中public函数,其他说明可参见草稿:https://www.haolizi.net/example/view_16592.html征求意见稿:https://www.haolizi.net/example/view_16896.html如有疏漏自行修正。  实在抱歉,源码有一点误差:Report_Function.cs 的print_File ()函数内修改为:if (_pgselect != -1)         {             pSize = new PaperSize(page_types[_pgselect] " page", (int)(PreViewPage_Area.Width / 25.4f * 100f), (int)(PreViewPage_Area.Height / 25.4f * 100f)); ..........................    }         else         {             ..............................             pSize = new PaperSize("Custom page", (int)(PreViewPage_Area.Width / 25.4f * 100f), (int)(PreViewPage_Area.Height / 25.4f * 100f));         }换算比例搞成旧的了,横向打印输出打印机打不全了。自己修改下
    2018-11-22下载
    积分:1
  • C#加密RAR压缩文件实例源码
    加密RAR压缩文件后,再打开的时候 需要输入密码才可以
    2013-01-28下载
    积分:1
  • JQuery+ajax 批量上传图片(附完整源码)
    JQuery+ajax 批量上传图片(附完整源码)
    2013-12-02下载
    积分:1
  • C# 获取 当前IE 浏览器版本信息 实例 源码
    C# 获取 当前IE 浏览器版本信息 实例 源码
    2013-06-19下载
    积分:1
  • 696518资源总数
  • 104224会员总数
  • 54今日下载