随笔分类 - Asp.net
摘要:1.在iis重写配置网站右击属性 主目录 配置里面 映射中查看确认文件是否没选中2.在web.config里面在system.web节点下面添加<compilation debug="true" targetFramework="4.0"> <buildProviders> <add extension=".html" type="System.Web.Compilation.PageBuildProvider" /> </buildProviders></co
阅读全文
摘要:<script language="网页特效" type="text/javascript">//显示层function public_show(tarid){ var tar = document.getelementbyid(tarid); if(tar){ tar.style.display = 'block'; } return false;}function public_hidden(tarid){ var tar = document.getelementbyid(tarid); if(tar){ tar.sty
阅读全文
摘要:<!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <span class="bds_more">分享到:</span> <a class="bds_qzone"></a> <a class="bds_tsina"></a> <a class="bds_
阅读全文
摘要:呵呵,本人是新手,有好多东西记不住,望大家多提意见哈 把页面生成静态页面: string url = "http://www.baidu.com/index.php"; new System.Net.WebClient().DownloadFile(url, Server.MapPath("~/default.html")); 1.asp.net 错误跳转事件 //错误跳转事件 protected void Page_Error(object sender, EventArgs e) { Exception ex = Server.GetLastErro
阅读全文
摘要:string email = this.emailInvite.Value.Trim(); if (this.emailInvite.Value.LastIndexOf(';') == email.Length - 1) email = email.Remove(email.Length - 1); string[] emails = email.Split(';'); try { SmtpClient client = new SmtpClient(basePage.ReadXML("smtp", 0));// 邮件发送类 client.E
阅读全文
摘要:1.排序datatable dtSJList=赋值;DataView dv = new DataView(dtSJList);dv.Sort = "souaddtime desc";//按时间进行倒序排序dtSJList = dv.ToTable();2.筛选datatable的Select方法例如: //进行模糊查找 protected void btnSearch_Click(object sender, ImageClickEventArgs e) { this.AspNetPager1.Visible = true; try { DataTable ds = ser
阅读全文
摘要:在<Head>标签中加<meta http-equiv="pragma " content="no-cache"><meta http-equiv="Cache-Control " content="no-cache,must-revalidate"><meta http-equiv="expires " content="Wed,26 Feb 1978 08:21:57 GMT ">如何用JQuery的ajax跳转,可以这样清
阅读全文
摘要:<script type="text/jscript"> function CheckProduct(){ if (document.getElementById("txtOldPwd").value =="") { document.getElementById("lblResult").innerText="旧密码不允许为空!"; return false; } else if (document.getElementById( "txtNewPwd").va
阅读全文
摘要:web DropDownList绑定数据源的几种方式第一种this.ddltype.DataTextField = "btName";//显示的值 this.ddltype.DataValueField = "btId";//获取dropdownlist中的值 ddltype.DataSource = service.GetBusinessTypeAll(""); this.ddltype.DataBind();第二种 DataTable dt_GetBusinessName = service.GetBusinessTypeAll(
阅读全文
摘要:如:存储过程如下:createPROC [dbo].[exchange_UserFinance]@uId int,@uType int,@uAmount decimal(9,2),@uAfterRemainAmount decimal(9,2),@uOPid int,@uText varchar(200),@uNote1 varchar(200),@uNote2 varchar(200),@uNote3 varchar(200),@uRemainAmount decimal(9,2) output AS DECLARE @uTime datetimeSET @uTime=getdate()SE
阅读全文
摘要:由于本人刚大学毕业,对asp.net刚入门,对技术也不太精通,容易忘记,所以记录下来了,很常用呀! /// <summary> /// 加载Grid /// </summary> /// <param name="dt_List">表对象</param> private void binderGird(DataTable dt_List) { // 清空 dgvOfficeRebate 中的列 this.dataGridView1.Columns.Clear(); // 清空 dgvOfficeRebate 中的行 this.
阅读全文
摘要:using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Data.SqlClient;using System.Collections;namespace SystemDAL{ /// <summary> /// 数据库的通用访问代码 /// 此类为抽象类, /// 不允许实例化,在应用时直接调用即可 /// </summary> public abstract class SqlHelper { /// <summary>
阅读全文
摘要:1. 打开新的窗口并传送参数: 传送参数: response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>") 接收参数: string a = Request.QueryString("id"); string b = Request.QueryString("id1"); 2.为按钮添加对话框 Button1.Attribu
阅读全文

浙公网安备 33010602011771号