`
varsoft
  • 浏览: 2574069 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论
文章列表
Response.Write("<script language='javascript'>window.opener.location=window.opener.location.href;</script>") 第一种方案是:file a.htm function OpenDialog(url,param){return window.open(url,param, "DialogWidth:450px;DialogHeight:450px;help:no;status:no");} file b.htm<scri ...
作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/上传图片,要求图片200100象素,大小小于2M,如果图片不符合要求,不能上传,否则上传图片,上传以后对图片按系统日期动态命名,保留路径到数据库里。 private void Button1_Click(object sender, System.EventArgs e){if(File1.PostedFile.ContentType.ToUpper().IndexOf("IMAGE")>-1){System.Drawing.Image img= System.D ...
<EMBED SRC="MY_LIFE.RPM" WIDTH=300 HEIGHT=134 >Tip:SRC是可以省略的,当mime Type 参数如下时:<EMBED ...,TYPE="audio/x-pn-realaudio-plugin",...>,这样做会产生不可预料的结果,因此强烈推荐你包含SRC属性,并且提供一个空的文件的文件名。
将一些HTML替换掉 eg:strContent=strContent.Replace("&","&amp");strContent=strContent.Replace("'","''");strContent=strContent.Replace("<","&lt");strContent=strContent.Replace(">","&gt");strContent=strConten ...
Response.Write("<script>window.opener=null;window.close();</script>") ;
public static long DirSize(DirectoryInfo d) { long Size = 0; // Add file sizes. FileInfo[] fis = d.GetFiles(); foreach (FileInfo fi in fis) { Size += fi.Length; } // Add subdirectory sizes. DirectoryInfo[] dis = d.GetDirectories(); foreach (DirectoryInfo di in dis) { Size += DirSize(di); } re ...
如何得到数据库中所有表字段及字段中文描述以下资料,通过csdn的一位师兄从SQL版主那得到:sql中SELECT (case when a.colorder=1 then d.name else '' end) N'表名',a.colorder N'字段序号',a.name N'字段名',(case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end) N'标识',(case when (SELECT count(*)FROM sysobjectsWHERE (name in (SELECT name FROM ...
作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/ CREATE PROCEDURE LoginUser @loginUN char(50) OUTPUT, @loginPW char(40)ASif @loginPW = (select [password] from users where username=@loginUN) return 0;else return -1; GO 要loginUN返回值,把它定义成OUTPUT的,相应的SqlCommand的参数定义里也定义也ParameterDirect.InputOutput ...
<asp:RegularExpressionValidator id="revTextBox1" runat="server" ForeColor="Red" Display="Dynamic" ControlToValidate="textBox1" ValidationExpression="(\w|\W){1,100}">格式错误-只能输入不超过100个字符</asp:RegularExpressionValidator>
作者:网际浪子专栏(曾用名littlehb) http://blog.csdn.net/littlehb/在域控制器或备份域控制器上安装 Microsoft Visual Studio .NET 或 Microsoft .NET 框架后,如果您尝试运行 ASP.NET 应用程序,则浏览器会显示下面的错误信息: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the " ...
微软的解决办法 using System; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Windows.Forms; public class PagingSample: Form { // Form controls. Button prevBtn = new Button(); Button nextBtn = new Button(); static DataGrid myGrid = new DataGrid(); static Label pageLbl = ne ...
作者:未知 由于本文网上多处见到 对于谁是作者 无法肯定 1、下载owc11 COM组件 http://www.microsoft.com/downloads/details.aspx?FamilyID=7287252c-402e-4f72-97a5-e0fd290d4b76&displaylang=en 2、注册owc11 在工程中添加 C:\Program Files\Common Files\Microsoft Shared\Web Components\11 文件下的owc11.dll引用 或者按如下图所以添加com 3、在工程中添加 using O ...
<body onkeydown="KeyDown()"> function KeyDown(){ //屏蔽退格删除键,屏蔽 F5 刷新键,Ctrl + R if ((event.keyCode==116)||(event.ctrlKey && event.keyCode==82)) { event.keyCode=0; event.returnValue=false; } }
程序中图片是动态显示的 原先把打算把图片保存在服务器端然后显示 可是由于ie的缓存问题导致图片无法实时更新显示 所以改为把图片存在session中然后再显示 需要保存的时候再保存到本地 //--------------chart.ashx.cs------------------- using System;using System.Web.SessionState;using System.IO;using System.Web; namespace WebApplication3{/// <summary>/// chart 的摘要说明。/// </summa ...
作者:木子 http://blog.csdn.net/derny/首先要创建一个表包含自段image 和 type 类型各自为image 和 vnanchar WebForm1.aspx <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="ReadAndWritePicFromDB.WebForm1" %> <!DOCTYPE HTML PUBLIC "-//W3C ...
Global site tag (gtag.js) - Google Analytics