![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c#
文章平均质量分 62
衿世伿僞妳
这个作者很懒,什么都没留下…
展开
-
C#连接数据库代码和注释与数据库的应用
本编程时C#对数据库的操作。详细步骤和注释。 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; namespace ConsoleApplication2 { class Program {原创 2013-09-05 17:49:24 · 770 阅读 · 0 评论 -
js键盘事件
js键盘事件 js键盘事件,详见下: function document.onkeydown() { var e=event.srcElement; if(event.keyCode==13) { document.getElem原创 2014-06-26 14:04:44 · 464 阅读 · 0 评论 -
实用文本框输入字符后下拉菜单内容自动匹配效果
实用文本框输入字符后下拉菜单内容自动匹配效果 html{overflow:-moz-scrollbars-vertical;} body{padding:0;margin:0;font:12px/1.5 Tahoma,Helvetica,Arial,sans-serif;} body,h1,p,blockquote,dl,dt,dd,ul,ol,li,input{margin:0;padding原创 2014-06-26 14:07:47 · 843 阅读 · 0 评论 -
调用优酷视频。 分享网站。
原创 2014-05-21 11:40:08 · 565 阅读 · 0 评论 -
在ASP.NET MVC中为DropDownList 绑定数据库的值
LianXiEntities lianxi = new LianXiEntities(); var user2 = from c in lianxi.T_BuMen select c; List item1 = new List(); for原创 2014-05-19 15:26:24 · 753 阅读 · 0 评论 -
javascript显示年月日时间代码
function time() { //获得显示时间的div t_div = document.getElementById('showtime'); var now = new Date() //替换div内容 t_div.innerHTML原创 2014-04-22 17:51:13 · 555 阅读 · 0 评论 -
asp.net分页和 jquery ajax 无刷新分页
asp.net分页 前台页面 !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3.org/1999/xhtml">原创 2013-12-30 14:12:48 · 557 阅读 · 0 评论 -
js求两个日期时间差。精确到年月日到秒
function bb() { var a = new Date(2013, 10, 28,00,00,00); var b = new Date(2013, 04, 01,00,00,00); a = a.valueOf(); b = b.valueOf(); var原创 2013-11-28 14:53:19 · 4917 阅读 · 2 评论 -
获取ip地址及所在地
string userIP; // HttpRequest Request = HttpContext.Current.Request; HttpRequest Request = HttpContext.Current.Request; // ForumContext.Current.Context.Request;原创 2013-11-14 17:27:54 · 776 阅读 · 0 评论 -
验证码
先建立一个一般应用程序 using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Web; using System.Web.SessionState; namespace 论坛 { /// /// Yanzheng原创 2013-11-11 16:38:43 · 721 阅读 · 0 评论 -
验证邮箱(注册时邮箱的验证)
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Net.Mail; namespace WebApplication1 {原创 2013-11-11 15:03:07 · 1946 阅读 · 0 评论 -
Md5加密
public static string GetMD5(string sDataIn) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] bytValue, bytHash; bytValue = System原创 2013-11-11 10:09:52 · 628 阅读 · 0 评论 -
asp.net 验证控件
ASP.NET公有六种验证控件,分别如下: 控件名 功能描叙 RequiredFieldValidator(必须字段验证) 用于检查是否有输入值 CompareValidator(比较验证) 按设定比较两个输入 RangeValidator(范围验证) 输入是否在指定范围 RegularExpressionValidator(正则表达式验证) 正则表达原创 2013-10-16 11:58:22 · 379 阅读 · 0 评论 -
C#中ref和out
4.ref和out ref和out属于引用型,而不是普通的值传递。引用型就有点像c++里面的指针,引用不是普通的赋值,而是直接指向对象; static void Main(string[] args) { int age = 10; int age1=10; int age2;原创 2013-09-16 16:58:20 · 528 阅读 · 0 评论 -
c#中的函数
.C#函数 1)方法的定义 [访问修饰符] {static} 返回值类型 函数名 ([参数列表]) { //方法体 } 返回值类型: void:没有返回值,也是一个类型,这个类型代表的含义函数的返回值为空。 int,string,double。 所有的数据类型都可以作为函数的返回类型。 函原创 2013-09-16 16:41:27 · 668 阅读 · 0 评论 -
ASP.NET 实现伪静态网页方法
我们有时候会见到这样的地址:“http://www.huoho.com/show-12-34.html”,你或许认为在站点服务器根目录“/”下存在名为“show-12-34.html”的文件,其实实际它可能是不存在的,而可能你看到的内容是“/aspx/show.aspx?type= 12&id=34”的内容,为什么要这样做呢?原因有多个方面:首先是增强URL的友好性,记“show-12-34.ht原创 2014-09-15 16:45:07 · 656 阅读 · 0 评论