- 博客(55)
- 资源 (1)
- 收藏
- 关注
转载 asp.net页面使用script后会改变样式
asp.net页面提交后页面样式改变 2010-06-30 10:16:50| 分类:.net c# | 标签:.net 样式 c# |字号大中小 订阅这是因为使用了: Response.Write("alert('用户名或者密码错误。')");用response.write输出JS,因这个些输出会先于文档样式声明,所以会使你的CSS失效.
2012-05-29 17:50:36 712
转载 jQuery获取Select选择的Text和Value:
2011-04-18 11:08jQuery获取Select选择的Text和Value:语法解释:1. $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发2. var checkText=$("#select_id").find("option:selected").
2012-04-08 21:21:23 295
原创 WebService应用技术
//在WebService中写个HelloWorld方法 [System.Web.Script.Services.ScriptService] public class WebService2 : System.Web.Services.WebService { [WebMethod] public string HelloWorld()
2012-04-06 20:50:56 490
原创 验证码
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">生成验证码 function createCode(len) { var seed = new Array( 'abcdefghijklmnopqrstuvwxyz',
2012-03-26 19:15:50 387
原创 窗口(window)对象:
窗口(window)对象:document: 文档对象frames: 框架对象screen: 屏幕对象navigator: 浏览器信息对象length: 框架数组的长度 属性:history: 历史对象location: 网址对象name: 窗口名字opener: 打开当前窗口的窗口对象parent: 当前窗口或框架self: 当前
2012-03-07 20:47:38 377
原创 计算时间差
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml"> var time1 = new Date(1991, 2, 23, 15, 13, 23); var time2 = new Date(1989, 3, 2
2012-03-06 21:13:48 375
原创 自写计算器
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml"> 计算器 var numb = 0; var jieguo = 0; var fu = ''; function showva
2012-03-05 21:28:28 414
原创 三种数据库连接方式
混合身份登录:Data Source=YHB-PC\SQLSERVER2008;Initial Catalog=MyTest;Persist Security Info=True;User ID=sa;Password=yhb@163 windows登录:data source=YHB-PC\SQLSERVER2008;database=csdnnews;integrated s
2012-02-28 20:43:37 503
原创 dataGridView1与数据库数据的同步更新
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Sy
2012-02-27 21:30:11 3670 3
原创 分页
public partial class 存储过程分页 : Form { int pagesize = 4; int pageindex = 1; int recordcount = 0; int totalsize = 0; public 存储过程分页() {
2012-02-24 15:16:55 310
原创 将txt中的数据插入到数据库中
txt中有 姓名 电话 地址 年龄 性别 等数据; 例如: 张三 | 87583 | ushfjghg| 18|男 using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.W
2012-02-23 21:05:20 456
原创 统计字符串中的数字个数
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespac
2012-02-22 20:46:29 691
原创 C#计算时间差函数TimeSpan的应用
C#计算时间差函数TimeSpan的应用 TimeSpan值包含了许多属性与方法,用语访问或处理一个TimeSpan值 Add:与另一个TimeSpan值相加 Days:返回用小时计算的TimeSpan值 Duration:获取TimeSpan的绝对值 Hours:返回用小时计算的TimeSpan值 Milliseconds:返回用毫秒计算的Time
2012-02-21 20:56:51 486
原创 C#中延时的实现
第一个 采用Thread方法先using system.threading;再在需要延时的进程处插入thread.sleep(int);application.doevent();这个方法只是直接将正在运行的进程HOLD,时间过后该进程再继续运行。第二个 采用Timer方法Timer控件 Timer.Enabled 属性用于设置是否启用定时器 Timer.Int
2012-02-20 21:07:27 3885
转载 常用的Web Service
下面总结了一些常用的Web Service,是平时乱逛时收集的,希望对大家有用。手机归属地: http://webservice.webxml.com.cn/WebServices/MobileCodeWS.asmx============================================天气预报Web Service,数据来源于中国气象局Endpoint
2011-12-21 19:08:29 386
转载 如何查询计算机中的盘符信息
DriveInfo info = new DriveInfo("C:"); this.Response.Write(info.DriveType.ToString() + ""); this.Response.Write(info.DriveFormat.ToString() + ""); this.Response.Write(info.To
2011-12-14 20:10:05 543
转载 总结的ASP.NET 常用性能优化方法
总结的ASP.NET26个常用性能优化方法 总结的ASP.NET26个常用性能优化方法2008-9-4 数据库访问性能优化 数据库的连接和关闭 访问数据库资源需要创建连接、打开连接和关闭连接几个操作。这些过程需要多次与数据库交换信息以通过身份验证,比较耗费服务器资源。 ASP.NET中提供了连接池(Connection Pool)改善打开和关闭数据库对性能的影响
2011-12-01 18:00:52 876
转载 ASP.NET 130到面试题及答案
ASP.NET 130道面试题及答案 ASP.NET 130道面试题及答案 2008-06-07 130道asp.net面试题(偏c#的asp.net面试题)分享给大家! 欢迎大家参与收集更全的asp.net面试题! 130道asp.net面试题(2007-06-10) 1. 简述 private、 protected、 public、 internal 修饰符
2011-12-01 17:58:33 1385
转载 在开发中.net类库中发送电子邮件
在开发中.net类库中发送电子邮件 在开发中.net类库中发送电子邮件2008-09-11 发送电子邮件是许多需要用户注册的网站的通用功能,通过正则表达式我们可以过滤掉不符合电子邮件格式的输入,但是仍没有办法确保用户填写的电子邮件地址一定是他本人真实有效的电子邮件地址,通常验证电子邮件真实有效的办法是:当用户填写的注册资料经过网站初步格式验证之后,用户并不能利用此帐号登录
2011-12-01 17:56:09 1093
转载 ASP.NET网络编程中经常用到的27个函数集
ASP.NET网络编程中经常用到的27个函数集 ASP.NET网络编程中经常用到的27个函数集2008-9-26 1、DateTime 数字型 以下是引用片段: System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now;
2011-12-01 17:46:19 773
转载 网站开发制作40个技巧
网站开发制作40个技巧 40个网站制作技巧 2008-09-05 1. oncontextmenu= "window.event.returnValue=false " 将彻底屏蔽鼠标右键 no 可用于Table 2. 取消选取、防止复制 3. onpaste= "return f
2011-12-01 17:40:03 766
转载 解读C#的规则表达式
多少年来,许多的编程语言和工具都包含对规则表达式的支持,.NET基础类库中包含有一个名字空间和一系列可以充分发挥规则表达式威力的类,而且它们也都与未来的Perl 5中的规则表达式兼容。 此外,regexp类还能够完成一些其他的功能,例如从右至左的结合模式和表达式的编辑等。 在这篇文章中,我将简要地介绍System.Text.RegularExpression中的类和方
2011-12-01 17:34:06 866
原创 月日年中 日的动态添加
protected void yue_SelectedIndexChanged(object sender, EventArgs e) { string yue1 = "04,06,09,11"; string[] sanshi=yue1.Split(','); string yue2 = "01,03,05,07,08,10,12"
2011-11-30 21:33:44 797
原创 如何往TreeView中添加数据
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using System.Configuration;using
2011-11-29 21:04:30 2478
原创 写邮件代码
MailMessage objMailMessage; //MailAttachment objMailAttachment; // 创建一个附件对象 // objMailAttachment = new MailAttachment( "d:\\test.txt" );//发送邮件的附件 // 创建邮件消息
2011-11-28 21:00:42 676
原创 自写分页
ASP代码: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) Bindboke(1); } private void Bindboke(int pageIndex) { string
2011-11-24 20:59:06 197
原创 GridViewd的DataSource绑定与DatasourceID绑定
DataSource绑定:先创建一个方法然后在 page_load 里 调用protected void GetList() { GridView1.DataSource =Answer.GetList(""); GridView1.DataBind(); } DataSourceID绑定:用Sql
2011-11-23 20:00:57 721
转载 GridView分页
PagerTemplate> br/> asp:Label ID="lblPage" runat="server" Text='<%# "第" + (((GridView)Container.NamingContainer).PageIndex + 1) + "页/共" + (((GridView)Container.NamingContaine
2011-11-22 20:38:31 370
转载 sql省市表 如何用代码生成
--**************************************************************CREATE TABLE common_Area( AreaID INTPRIMARYKEY, AreaName NVARCHAR(50) NOTNULL, RootID INT, ChildAmount INT, Depth INT, S
2011-11-21 21:07:43 4169
原创 闪烁字体的实现
function initArray() { this.length = initArray.arguments.length; for (var i = 0; i this[i] = initArray.arguments[i]; }}var ctext = "看看我,我会变色";var speed = 1000;var x = 0;var colo
2011-11-17 20:41:56 583 1
转载 浮动广告的实现
var ImgSrc="a.jpg"; //修改这里的图片路径suspendcode=""document.write(suspendcode);lastScrollY=-180;function heartBeat(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)p
2011-11-16 20:58:52 290
原创 map的应用
请点击图像上的星球,把它们放大。src="示例图片_03.jpg"border="0" usemap="#planetmap"alt="Planets" />shape="circle"coords="180,139,14"href ="http://www.baidu.com"target ="_blank"alt="Venus" />shap
2011-11-15 20:22:06 273
原创 html不能忘得基础知识
(1)基本语法 http://www.sina.com" target="">sinatarget属性确定链接页面显示的窗口 _blank(新窗口), _self(原窗口) (2)文档内导航 … … … to top (3)发送邮件 mailto:eric_ct@126.com?subject=hello">发送邮件(4)图片作为链接 (5)图片
2011-11-14 21:13:32 427
转载 微软WPF技术应用与实践系列
1、WPF 体系结构a)WPF(Windows Presentation Foundation)Windows 表现层b)历史变迁i.C++ /VB ---2003年之前----与Sun竞争ii.DotNet平台(C#、VB、C++) C#(C->C++->C#/CSharp)iii.开发工具Visual Studio2003->vs2005->vs2008->vs2
2011-11-09 21:28:27 1569
原创 把输入数字内容转换为金钱数输出
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;public partial class _Default : System.Web.UI.Page{
2011-11-08 22:17:48 631
原创 点击按钮选择文件用相应的程序打开
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Sy
2011-11-07 20:20:20 527
原创 调用主题
1.添加ASP.Net文件夹 2.添加主题 3.在主题中添加主题文件(样式表或外观文件) 4.新建一个网页 5.在page指令中添加 theme=“主题名” 6.可以通过默认外观 和命名的空间外观两种方式调用
2011-11-06 11:51:38 203
原创 验证码与flash图片交换效果的实现
验证码的使用基本代码: 生成验证码 function createCode(len) { var seed = new Array( 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '0123456789'); //
2011-10-31 22:20:46 559
原创 存储过程的用法及与C#代码的不同
下面是个存储过程的应用 set ANSI_NULLS ONset QUOTED_IDENTIFIER ONGO-- =============================================-- Author: -- Create date: -- Description: -- ================================
2011-10-20 21:16:20 266
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人