随笔分类 - 学习点滴
摘要:前几天在看到有个学Windows Azure课程,送Windows Azure的活动,课程地址:http://www.microsoftvirtualacademy.com/ 在活得体验资格后,就迫不及待的捣鼓了下。在这里就介绍一下如何将自己的网站部署到Windows Azure上。 首先介绍下本机环境: -- 安装了Visual Studio 2013(自带数据库设计工具;虽然安装了...
阅读全文
摘要:SQL Server 作业无非就是按照规定的时间执行指定的脚本,这里介绍如何用SSMS(SQL Sever 2008)创建作业备份数据库。(0)假设在创建作业之前你所要备份的数据库已经存在;其次,你已经会启动SQL Sever 代理(一般是关闭的)(1)创建SQL Server代理作业(1.1)新建...
阅读全文
摘要:案例实现效果:通过鼠标左键单击窗口空白处,按住鼠标来拖动窗口。该案例实现很简单,可以应用在一些自定义窗口(如窗口不显示标题栏等情况)。<Window x:Class="ClickWhitespaceAndDrag.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="ClickWhitespaceAnd
阅读全文
摘要:情景:在上传文件时,采用FileUpload1.PostedFile.ContentType来获取文件的类型,当上传wps文档时出现了“将截断字符串或二进制数据”的异常,刚开始以为是文件路径的长度超过了数据库里设置的相应字段的长度,可是长传同文件下的文件名更长的MS word文档,却没有出现异常。后来设置断点查看数据的长度发现wps文件的ContentType超过了20(自己设定的数据库字段长度)。解决办法:很简单,修改数据库相应字段的长度。
阅读全文
摘要:在内容页中引用母版页中的属性时需要注意:1.首先必须保证在内容页源视图中添加了@ MasterType 指令如下:<%@ MasterType VirtualPath="~/masters/SourcePage.master" %>否则将无法以"Master.成员字段"的方式来引用母版也的成员,要区分开@MasterType指令与应用母版页的区别。即使没有包括 @ MasterType 指令,也可以访问母版页上的成员。但是,若要执行此操作,必须将 System.Web.UI.Page.Master 属性强制转换为适当的母版页类型(如果页面没有
阅读全文
摘要:前提:在web编程中会涉及到有的页面需要登录后才能访问,所以我编写了一个基类(Adminbasepage)用来判断诸如session,Cookies是否存在来控制页面是否允许访问。若不能访问就自动转到登录页面。而我所写的登录页面又是转到固定的页面,所以问题来了,如何转到上次请求的页面?1.首先尝试了使用 Request.UrlReferrer(1)首先在Load事件中写以下代码protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Requ...
阅读全文
摘要:众所周知,web.config可以存储包括数据库链接在内的众多信息,所以为配置文件加密有时候就显得必要了。1.加密前的配置文件如下:Web.config 1 <?xml version="1.0"?> 2 3 <configuration> 4 <connectionStrings> 5 <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBF
阅读全文
摘要:相信RSA加密大家都不陌生,MD5加密虽然也是一种加密手段,但是MD5加密是单向加密,不可以解密,在某些场合下显得非常不方便,所以今天特地MSDN上找了个例子来认识RSA加密。 1.首先是前端代码 ...
阅读全文
摘要:1.Use Query String注:以前总是忽略了Server.UrlEncode() AND Server.UrlDecode() 切记,切记!(1)Source Page1 protected void QueryStringButton_Click(object sender, EventArgs e)2 {3 Response.Redirect("QueryStringPage.aspx?Data=" + Server.UrlEncode(DataToSendTextBox.Text));4 }(2)Target Page1 ...
阅读全文
摘要:控件结构如下 <ajaxToolkit:TabContainer ID="TabContainer1" Height="300px" runat="server" CssClass="ajax__myTab" ActiveTabIndex="0"> <ajaxToolkit:TabPanel runat="server" ID="p1" ToolTip="num"> <HeaderTemplate>
阅读全文
摘要:1.Resizable Server PropertiesTargetControlID - The ID of the element that becomes resizableHandleCssClass - The name of the CSS class to apply to the resize handleResizableCssClass - The name of the CSS class to apply to the element when resizingMinimumWidth/MinimumHeight - Minimum dimensions of the
阅读全文
摘要:该控件的作用就是配合验证控件使用,以气球的形式弹出错误提示。TargetControlID - The ID of the Validator to extend.(要添加扩展的验证控件的ID)Width - The Width of the callout.()CssClass - Name of the CSS used to style the ValidatorCallout.See the ValidatorCallOut Theming section for more information.(低版本中不存在该属性,该属性是该控件的核心)添加CssClass后如下图:>&g
阅读全文
摘要:PagingBulletedList is an ASP.NET AJAX extender that can be attached to an ASP.NET BulletedList control and provide client-side sorted paging. It is very flexible and lets you specify either the number of characters used in the heading indices or the maximum number of items to display per index. If t
阅读全文
摘要:1.ListSearch Server ReferencePromptText - Message to display when the ListBox or DropDownList is given focus. Default is 'Type to search'. The PromptText is replaced by the search text typed by the user.PromptCssClass - The name of the CSS class to apply to the prompt message.PromptPosition
阅读全文
摘要:关于Nobot可以参看NoBot,一下提供一个微软的案例: 1 <form> 2 <asp:ScriptManager ID="ScriptManager1" runat="server" /> 3 <div> 4 <asp:MultiView ID="MultiView1" runat="server"> 5 <asp:View ID="View1" runat="server"> 6 <p>Pleas
阅读全文
摘要:该控件可以扩展到ASP.NET CheckBox,一组都添加该扩展的复选框只要设置相同的key,那么一次就只有一个复选框能被选中(Checked),类似Radio Button。The use of checkboxes however allows you to choose to uncheck a value which is not possible normally with radio buttons. This also provides a more consistent and expected interface than using javascript to allow
阅读全文
摘要:1.DropDown Server ReferenceTargetControlID - The ID of the control which needs a drop-down.(ex:Label or TextBox)<补充一点:TargetControl的文本是不能改变的>DropDownControlID - The ID of the control which will be displayed as the dropdown.2.Demo(1)HTML Code 1 <asp:ScriptManager ID="ScriptManager1"
阅读全文
摘要:虽然不使用Ajax Contorl Toolkit也能实现该效果,当然如果使用ASP.NET中自带的Calendar要解决异步刷新还要配合UpdatePanel使用。但或许该控件对多数人还是相对容易些。首先对该控件的一些常用属性做一下基本的了解:TagetControlID - 一般是TextBox的 ID.CSSClass - Name of the Cascading Style Sheet class Use to style the calendar.DaysModeTitleFormat - Format string used to display Days Mode Title.
阅读全文
摘要:1.控件效果2.ToggleButton Server PropertiesTargetControlID - The ID of The CheckBox to modify.ImageHeight\ImageWidth - The height and width of the image.CheckedImageUrl- The URL of the image to show when the toggle is in the checked state.UnchekedImageUrl - the URL of the image to show when the toggle bu
阅读全文
摘要:TargetControlID - ID of the TextBox to attach to(要添加扩展的TextBox ID)DisplayPosition - Positioning of the strength indicator relative to the target control(密码强度提示相对于TextBox的位置,AboveLeft,AboveRight,BelowLeft,BelowRight,LeftSide,LeftRight)StrengthIndicatorType - Strength indicator type (Text or BarIndica
阅读全文

浙公网安备 33010602011771号