2013年6月18日
摘要: 登录页:前台:<div> 用户:<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox><br /> 密码:<asp:TextBox ID="txtPwd" runat="server"></asp:TextBox><br /> <asp:Button ID="Button1" runat="server" Text=&quo 阅读全文
posted @ 2013-06-18 20:46 小菜鸟—— 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 在项目中添加Web窗体和web用户控件。Web用户控件前台:代码;(ps:都只是验证的不为空,密码一致)<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MyRegister.ascx.cs" Inherits="委托的简单应用.MyRegister" %><script src="js/Jquery1.7.js" type="text/javascript"></scrip 阅读全文
posted @ 2013-06-18 20:22 小菜鸟—— 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 委托可以把一个方法作为参数代入另一个方法。委托可以理解为指向一个函数的指针。简单案例:文本框中只能输入数字,否则提示错误在项目中添加Web窗体和Web用户控件。Web用户控件前台样式:后台代码:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace 委托的简单应用{ public partial class WebUserControl1 : System.Web.. 阅读全文
posted @ 2013-06-18 20:21 小菜鸟—— 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 多线程的目的是是提高速度,而是同时可以执行多个功能,我觉得速度相对会变慢一些,如下小案例:输出数字与字符串,用控制台应用程序实验:单线程:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;using System.Threading;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { //单线程 ... 阅读全文
posted @ 2013-06-18 19:37 小菜鸟—— 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 界面非常简单,有一个下载按钮,一个名为资源库的按钮,还有一个backgroundWorker1控件(ps:目的当点击下载按钮的时候不影响点击资源库按钮,意为多线程),backgroundWorker1的DoWork事件中的代码:for (int i = 30320; i < 30340; i++) { try { WebClient client = new WebClient(); client.DownloadFile(@"http://job.cnblogs.com/offer/" + i + "/", @"D:\... 阅读全文
posted @ 2013-06-18 19:36 小菜鸟—— 阅读(159) 评论(0) 推荐(0) 编辑