07 2011 档案
摘要:Chapter03: AccountProfile Index.aspx: <h2>Profiles</h2> <table> <tr> <th>Username</th> <th>First name</th> <th>Last name</th> <th>Email</th> <th> </th> </tr> <% foreach (var profile in Model) { %...
阅读全文
摘要:Chapter02: 1). InputModel New.aspx: <h2>New Customer</h2> <form action="<%= Url.Action("Save") %>" method="post"> <fieldset> <div> <%= Html.LabelFor(x => x.FirstName) %> <%= Html.TextBoxFor(x => x.Fir...
阅读全文
摘要:Chapter01: 1). GuestBook Index.aspx: <form method="post" action="/GuestBook/Sign"> <fieldset> <legend>Guest Book</legend> <%= Html.Label("Name") %> <%= Html.TextBox("Name") %> <%= Html.Label("Email") ...
阅读全文
摘要:1.ASP.NET MVC3 中的路由 同前边一样本篇并不会过多的介绍理论知识,我们在Global.asax.cs文件中可以看到如下代码: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action =...
阅读全文
摘要:Link:http://www.cnblogs.com/hedywqy/archive/2011/07/12/2104683.html有时项目要用到邮箱验证就要发送邮件传统的解决方案:public void SendResetPasswordEmail(string email){ MailAddress from = new MailAddress("XXX@126.com", "Mercury"); //填写电子邮件地址,和显示名称 MailAddress to = new MailAddress(email, email); //填写邮件的收件人地
阅读全文
摘要:Links:http://www.cnblogs.com/n-pei/archive/2010/10/11/1848089.html 国庆放假归来,刚好赶上asp.net mvc 3 beta发布,和大家分享点我的体验。 首先是创建项目时的选择界面的改变: 1.View Engine的变化。 asp.net mvc 3中添加了Razor这个View engine。 如果你在创建的项目中同时有Ind...
阅读全文
摘要:1. 新建项目 打开VS2010,选择 文件>新建>项目,新建ASP.NET MVC3 Web 应用程序,我这里把它命名为Blog。 2. 编写实体类 对于一个博客,一下几个类应该是必须的吧: Post 博客文章类 Comment 文章评论类,和Post是一对多的关系 Category 目录类,和Post是一对多的关系 Tag 标签类,和Post是多对多的关系 FriendLink 友情链接类 先...
阅读全文
摘要:Links:http://www.cnblogs.com/cnmaxu/archive/2010/10/13/1849972.html 昨天,我写了一篇文章(参见:ASP.NET MVC 依赖注入),这种实现方式我个人一直感觉不太顺,在写出来与大家一起分享的同时, 也是想让大家提提自己的建议, 今天下载了微软发布的最新的 ASP.NET MVC3 Beta 版,同时也仔细阅读了它的 Release...
阅读全文
摘要:http://www.asp.net/mvc
阅读全文
摘要:Links: http://www.asp.net/mvc/tutorials This is a series of tutorials that explain ASP.NET MVC. ASP.NET MVC Overview ASP.NET MVC Routing ASP.NET MVC Controllers ASP.NET MVC Views ASP.NET MVC Models AS...
阅读全文
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>新闻点评功能</title> <sc...
阅读全文
摘要:1). $.get发送请求 $(function() { $("#Button1").click(function() { //按钮单击事件 //打开文件,并通过回调函数返回服务器响应后的数据 $.get("UserInfo.aspx", { name: encodeURI($("#txtName").val()) }, function(data) { $("#divTip") .empty()...
阅读全文
摘要:1). 传统的JavaScript方法实现Ajax功能 var objXmlHttp = null; //声明一个空的XMLHTTP变量 function CreateXMLHTTP() { //根据浏览器的不同,返回该变量的实体对象 if (window.ActiveXObject) { objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }...
阅读全文
摘要:1). 获取元素的属性 $(function() { var strAlt = $("img").attr("src"); //属性值一 strAlt += "<br/><br/>" + $("img").attr("title"); //属性值二 $("#divAlt").html(strAlt); })2). 设置元素的属性 $(function() { $("img").attr("src"...
阅读全文
摘要:1). nth-child(even) $(function(){ $("#tbStu tr:nth-child(even)").addClass("trOdd"); })2). html $(function(){ $("#divT").html("这是一个检测页面"); })3). jQuery基本选择器 $(function(){ //ID匹配元素 $("#divOne").css("dis...
阅读全文
摘要:1). $(document).ready $(document).ready(function(){ alert("您好,欢迎来到jQuery世界"); }) $(function () { alert("您好,欢迎来到jQuery世界"); });2). toggleClass, slideToggle $(function () { $(".divTitle").click(functio...
阅读全文
摘要:Console.WriteLine(Evaluator.Eval("1+2+3+4+5+6+7+8+9"));//45Console.WriteLine(Evaluator.Eval("(1+1)/2*3"));Console.WriteLine(Evaluator.Eval("((10-2)/2+1)*3"));//15usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.CodeDom.Compiler;u
阅读全文
摘要:voidApplication_Start(objectsender,EventArgse){//CodethatrunsonapplicationstartupMicrosoft.WindowsAzure.CloudStorageAccount.SetConfigurationSettingPublisher((configName,configSetter)=>{configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));});}//-----------------------------------
阅读全文
摘要:Using the Windows Azure Storage ServicesWindows Azure PlatformThe Windows Azure storage services provide storage for binary and text data, messages, and structured data in Windows Azure. The storage services include:The Blob service, for storing binary and text dataThe Queue service, for storing mes
阅读全文
摘要:Understanding the Table Service Data ModelWindows Azure PlatformThe Table service offers structured storage in the form of tables. The following sections outline the Table service data model.Storage AccountA storage account is a globally unique entity within the storage system. The storage account i
阅读全文