- 博客(10)
- 资源 (5)
- 收藏
- 关注
原创 Html.DropDownListFor()通过ViewData绑定值
var titles = new List();titles.AddRange(new SelectListItem[]{new SelectListItem{Value="11111",Text="11111"},new SelectListItem{Value="22222",Text="22222"}}); View: // 错误的写法 Html.DropDownListFor(
2012-02-17 19:17:02 1499
原创 C#将泛型转换成JSON字符串
ASP.NET 3.5已支持JSON了,在其扩展中System.Web.Extensions.dll。 JavaScriptSerializer serializer = new JavaScriptSerializer(); List zentag = new List(); zentag.Add(new zen_tag { tag_id
2011-12-07 14:29:12 1788
原创 脚本获取ASP.NET服务器控件ID
需要使用服务器控件ID时,不要使用服务器端的ID,因为在母版或者用户控件下,服务器端ID在客户端的ID会发生改变 因此应用以下用法: //JS document.getElementById("") //JQuery $("#")
2011-08-29 10:10:58 424
原创 通过Application统计网站访问人数和在线人数
这个需要在Global.asax文件里做文章,废话不多说,代码如下: string path = ""; void Application_Start(object sender, EventArgs e) { // 在应用程序启动时运行的代码 int coun
2011-08-24 13:13:52 2316
原创 传递未知个数的同类型参数
通过params可以传递多个参数 static void Main(string[] args) { Test("a","aa","aaa"); Test("insert into Table_1(name,age
2011-08-24 13:10:03 505
原创 SqlServer与C#中数据类型的对应关系
SqlServer数据类型 C# 数据类型 int Int32 text / ntext String bigint Int64 varbinary / binary byte[] bit Boolean
2011-08-24 12:59:43 577
原创 TextBox中按回车时激发按钮事件
protected void TextBox1_TextChanged(object sender, EventArgs e) { Button1_Click(sender, e); } protected void Button1_Click(object se
2011-08-24 12:57:11 607
原创 JQuery实现添加到收藏夹及设为主页功能
//添加到收藏夹 $(document).ready(function () { $("#favorites").click(function () { //$里面是链接的id var
2011-08-24 12:54:50 3718
原创 SQLServer中Case的用法
一些简单的用法,有空会写完整点的if object_id('tempdb..#test2') is not null drop table #test2 create table #test2 ( 单号 nvarchar(20), 金额 int ) insert in
2011-08-24 12:52:57 558
原创 实用SQL语句
一、判断表是否存在 1、正常表 if object_id('tableName') is not null drop table tableName --如果表存在,则删除 2、临时表 if object_id('tempdb..#tableName') is not null drop table #tableName --如果临时表存在,则删除 二、获取字符串字节长度和字
2011-08-24 12:44:57 351
tomcat-8.0.28+solr5.3.1安装教程
2015-11-05
MVC权限控制小例子(重写AuthorizeAttribute)
2012-03-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人