<!--使表格带有连接功能--->
<html>
<head>
<title>HTML document</title>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" width="200" height="200" bgcolor="Gray"><tr><td onmouseover=this.bgColor="#800000" onclick=window.location.href="http://www.google.com">google</td></tr><tr><td onmouseover=this.bgColor="#008000" onclick=window.location.href="http://www.blueidea.com">bluidea.c ... 0" onclick=window.location.href="http://www.blueidea.com/bbs">bbs</td></tr></table>
</body>
</html>
<%
'获取URL值,跳转到新网址
dim a,b
a=request.querystring("boardID")
b=request.querystring("id")
response.redirect("http://bbs.anquan.com.cn/dispbbs.asp?boardid ... "&id="&b)
%>
<%@ Language=VBScript %>
<html>
<title>No.2根据远程主机地址来进行判断,如果为本地地址则进入欢迎页面,否则显示出错信息.</title>
<body>
本地ip
<%=Request.ServerVariables("REMOTE_ADDR")%>
服务器IP
<%=Request.ServerVariables("LOCAL_ADDR")%>
<%
dim address
address = request.servervariables("REMOTE_ADDR")
response.write address
if address="127.0.0.1" then
'如果为本地,则显示欢迎页面.
response.write "你好,欢迎进入本站点."
'response.redirect "http://localhost/100asp/001.asp"
else
'否则显示出错信息.
response.write "对不起,你无权查看内部站点."
end if
%>
</body>
</html>
'按时间判断,显示最新标志
<%
mytime=rs("time") '数据库中保存时间
nowtime=now() '当前时间
if datediff("d",mytime,nowtime)<1 then
'比较当前时间和数据库中时间,如相差小于1,即显示图片new.gif
%>
<img src="images/new.gif">
<%end if%>
'图片大时,自动缩小的写法.
<img border="0" src="<%=trs("e_simg")%>" onload="javascript:if(this.width>120)this.width=120" alt="<%=trs("e_trem")%>">
'几个条件语句的写法
while ...........wend
do while .................loop
有判断是
if........else end if
if........elseif end if
'长标题截取的写法1
<% if len(rs("showname"))>13 then%>
<%=left(rs("showname"),12)%>..
<% else%>
<%=rs("showname")%>
<%end if%>
'写法2
<%if len(rs("quizTitle"))>13 then response.write left(rs("quizTitle"),12)&".." else response.write rs("quizTitle") end if%>
'出错或完成操作后提示语句.
<%
response.write "<script language=javascript>alert('请留言!');window.location.href='liuyan.asp';</script>"
%>
<%
response.write "<script language=JavaScript>" & chr(13) & "alert('请检查您填写的内容是否完整!');" & "history.back()" & "</script>"
%>
'把表中有限的几个分类转换成"汉字"
<%
dim quizClass,quizOption
'quizClass=rs("quizLib.quizClass")
quizClass=rs("quizClass")
select case quizClass
case "radio1"
response.Write("判断题")
case "radio2"
response.Write("单选题")
case "checkbox"
response.Write("多选题")
case "text"
response.Write("填空题")
end select
%>
'确定删除一条记录
<a href="del.asp?info_id=<%=rs("info_id")%>" onclick=return(confirm("确定要删除第<%=rs("info_id")%>条记录吗?"))>删除</a>
'动态显示下拉菜单
'如果记录集为空就指向主页
'value值为表subject中的ID
<select name="booktype" class="button1" id="booktype" style="width:250">
<option value=all selected>试题学科</option>
<%
sql="SELECT * FROM subject"
set rs=conn.execute(sql)
if rs.bof or rs.eof then response.Redirect("index.asp")
while not(rs.bof or rs.eof)
response.Write "<option value="&rs("id")&">"&rs("subjName")&"</option>"
rs.movenext
wend
%>
</select>
'获取数据库里的
<select name="mem_sex" id="mem_sex">
<option value="男" <%if rs("mem_sex")="男" then response.write "selected"%>>男</option>
<option value="女" <%if rs("mem_sex")="女" then response.write "selected"%>>女</option>
</select>
<!--限制文本框不能输入空格-->
<script language="javascript">
function id_keyup(txtinput)
{
txtinput.value=txtinput.value.replace(/(^/s*)|(/s*$)/g, "");
}
</script>
<input type="text" name="id" onkeyup="id_keyup(this)">
9.随机背景音乐:
<%randomize%>
<bgsound src="mids/<%=(int(rnd()*60)+1)%>.mid" loop="-1">
可以修改数字,限制调用个数,我这里是60个.
状态栏文字的显示,这个简单实用!
<BASE onmouseover="window.status='欢迎光临!-我的邮件:mxsky{at}126.com';return true">
打开的一个迷你窗口
『复制代码』『运行代码』
<script language="javascript">
function mini_window(page,w,h)
//打开一个小窗口
/*
page 页面名称
w 宽度
h 高度
*/
{
var arr = showModalDialog(page, "", "dialogWidth:"+w+"px; dialogHeight:"+h+"px; status:0;help:0");
}
//打开一个小窗口
</script>
<body style="overflow:scroll;overflow-x:hidden;overflow-y:hidden">
<a style=cursor:hand ; onclick=mini_window('default.asp','650','515')>打开新窗口</a>
</body>
加标题的电子邮件:
<a href="mailto:admin@anquan.com.cn?subject=关于考试系统的问题">flashboy</a>
iframe调用时如何让背景透明
<Iframe src="transparent.htm" allowtransparency="true"></Iframe>
transparent.htm
<body style="background-color:transparent">
按钮在原窗口打开
<input type="button" name="button2" value="注册" onclick="location.href='http://www.google.com'">
按钮在新窗口打开
<input type="button" name="button2" value="注册" onclick="window.open('http://www.google.com')">
让英文字符串超出表格宽度自动换行
<td style="word-wrap:break-word; word-break:break-all;">
永远都会带着框架
<script language="JavaScript">
<!--
if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
// -->
</script>
防止被人frame
<SCRIPT LANGUAGE=JAVASCRIPT>
<!--
if (top.location != self.location)top.location=self.location;
// -->
</SCRIPT>
网页将不能被另存为
<noscript><iframe src=*.html></iframe></noscript>
删除时确认
<a href='javascript:if(confirm("确实要删除吗?"))location="del.asp"'>删除</a>
不要滚动条
让竖条没有:
<body style='overflow:scroll;overflow-y:hidden'>
</body>
让横条没有:
<body style='overflow:scroll;overflow-x:hidden'>
</body>
两个都去掉?更简单了:
<body scroll="no">
</body>
鼠标划过,表格变色
<tr onmouseover="this.bgColor='red'" onmouseout="this.bgColor=''">
屏蔽右键
<body oncontextmenu="return false;">
或
<script language="JavaScript">
<!--
if (window.Event)
document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
//-->
</script>
用正则强制输入数字
<input name="id2" type="text" onkeyup='this.value=this.value.replace(//D/gi,"")'>
禁止输入中文
<input type=text style="ime-mode: disabled ">
不允许文本框自动完成
<input autocomplete=off>
图片变灰,掠过恢复
<img src="http://community.youkuaiyun.com/images/csdn.gif" style="filter:gray" onmo ... useout="this.style.filter='gray'">
定时跳转到其它页面
<meta http-equiv="refresh" content="5;URL=http://54caizi.com">
TITLE换行
<a href=# title="第一行第二行第三行">title分行测试</a>
行背景色渐变
<table width="100%" height="100%">
<tr><td style="FILTER: progid:DXImageTransform.Microsoft.Gradient(endColorstr='#EFF3FF', startColorstr='#94B2F7', gradientType='1')" ></td></tr>
</table>
说明:
功能从startcolorstr渐变到endcolorstr
gardientType 是填充样式,具体值请自己尝试
调用其它页面
<object type="text/x-scriptlet" width="800" height="1000" data="a.htm"></object>
Iframe的常用用法
<iframe WIDTH=100% HEIGHT=240 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 allowTransparency="true" SCROLLING=no SRC='Cay/blog.asp'></iframe>
相关推荐
中移物联ML307C模组OPENCPU笔记2
本文介绍了如何编译和运行一个DEMO程序,以官方SDK为例。
Asp 常用函数
Asp 常用函数 ===textarea显示用===function htmlencode1(fString) if fString fString = replace(fString, ">", ">") fString = replace(fString, "<", " fString = Replace(fString, " ", chr(32)) fS
做量化没有实时数据怎么行?我找到一个超级好用的Python库,速度还贼快!
今天咱们介绍了 pytdx 这个神奇的库,重点包括:✅ 安装 pytdx✅ 连接 TDX 服务器✅ 获取实时行情数据✅ 获取 K 线数据✅ 获取分笔成交数据总之,pytdx 是一个速度快、免费、易用的量化利器,适合 A 股量化交易的同学们使用。如果你还在为数据发愁,赶紧试试吧!🚀顺手再看就是对花姐最大的支持,期待你的关注。
ASP.NET里常用的JS
usingSystem;usingSystem.Web;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI;namespaceWeb.JScript{///<summary>///提供向页面输出客户端代码实现特殊功能的方法///</summary>///<r...
【电子元件篇】电力电子中的变压器原理、作用、选型与测量指南-超简单解读
变压器虽小,却是电力电子的 “关键纽带”——从识别符号型号,到理解 “传交流隔直流” 的特点,再到按用途选参数、用万用表检测,只要抓住 “场景对应核心” 的逻辑,就能轻松掌握它的用法。
NVIDIA驱动版本太低?手把手教你解决CUDA与PyTorch版本冲突问题
本文针对深度学习开发中常见的NVIDIA驱动版本过低导致的CUDA与PyTorch版本冲突问题,提供了从根源理解到实战解决的完整指南。文章详细解析了驱动、CUDA与PyTorch的依赖关系,并给出了升级驱动、降级PyTorch、使用Conda环境管理及Docker容器化四种核心解决方案,帮助开发者快速诊断并构建稳定的GPU开发工作流。
Asp.net MVC Web.config配置技巧
Asp.net MVC Web.config配置技巧 一、视图引入命名空间的设置 之前经常写这样的代码,而且每个页面都要写: @model IEnumerable<MvcStart.Models.People_Model> 其实有一...
MeloTTS 生成 RKNN 模型
摘要: 本方案基于RK3588平台,利用RKNN工具链实现高效语音合成(TTS)。采用MeloTTS开源模型,支持中英文混合语音生成。部署流程包括:1) 导出ONNX模型;2) 转换为RKNN格式;3) 在RK3588开发板运行。关键步骤包含环境配置(RKNN Toolkit2≥1.4.0)、模型转换(非量化处理)及音频处理实现。方案充分发挥RK3588的NPU加速能力,适用于边缘设备语音合成场景
Asp.Net Web 常用控件
根据上课内容调整笔记,不定时更新,如有错误,欢迎指出
0基础学习diffusion_model扩散模型【易理解的公式推导】Denoising Diffusion Probabilistic Models
去噪扩散概率模型。本文是笔者在学习扩散模型时的一些笔记与心得,在公式推导过程中能够保证自己是一步一步去推导并且理解了的。概述是我认为比较重要的部分能够帮助理解公式的推导,具体的公式推导在每一小节中进行。1、扩散过程:如上图所示,扩散过程为从右到左X0→XTX0→XT的过程,表示对图片逐渐加噪,且Xt1X_{t+1}Xt1是在XtX_{t}Xt加躁得到的,其只受XtX_{t}Xt的影响,因此扩散过程是一个马尔科夫过程。X0X_0。
高云FPGA系列教程(1):FPGA和ARM开发环境搭建
至此,高云FPGA和MCU开发环境就搭建完成了,整体还是比较简单的,几乎是一键完成,下一篇文章我们进行实际的FPGA和MCU开发。本文是高云FPGA系列教程的第1篇文章。
ASP开发必备:WEB打印代码大全
ASP开发必备:WEB打印代码大全这篇文章主要介绍了如何使用ASP控制Web的各种打印效果,它能够控制纵打、横打和页面边距等。 1、控制"纵打"、 "横打"和"页面的边距"。 (1) function SetPrintSettings() { // -- advanced features factory.printing.SetMarginMeasu
ssm框架搭建
这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载
常用ASP函数封装
所有功能函数名如下: StrLength(str) 取得字符串长度 CutStr(str,strlen) 字符串长度切割 CheckIsEmpty(tstr) 检测是否为空 isInteger(para) 整数检验 CheckName(str) 名字字符校验 CheckPassword(str) 密码检验 CheckEmail(email) 邮箱格式检验 Alert(msg,go
LinePhone3.2.7(android端最新版本) sip客户端
SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
ASP.NET Web Forms - Button 控件
这篇文章是ASP.NET Web Forms中Button控件的实战指南,涵盖了7种常用按钮类型、企业级组合写法及8种后台代码处理方式。重点介绍了保存/删除/审核等场景的代码实现,并分享了防重复提交、权限控制等高级技巧。文章还提供了包含40+企业级按钮模板的福利包,可直接应用于实际项目开发,帮助开发者快速构建专业后台界面。所有示例均基于Bootstrap 5和Font Awesome 6美化,强调实战性和可复制性。
文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况
主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。
ASP.NET Web Forms - 服务器控件
2025年企业级Web开发实战:ASP.NET Web Forms服务器控件指南 摘要:本文为2025年最新ASP.NET Web Forms服务器控件实战指南,重点介绍企业后台开发中90%系统仍在使用的核心控件。内容包含6大类控件速查表(基础输入、数据显示、数据绑定、导航、验证、登录),详细展示Top 15神级控件的企业级写法,包括GridView(增删改查+分页+排序)、Repeater(灵活数据展示)、DetailsView(快速表单处理)等。同时提供可直接复用的代码模板和事件处理方法,帮助开发者在3
php、jsp、asp和aspx的区别
目录 PHP JSP ASP ASP.NET PHP PHP是一种跨平台的服务器端的嵌入式脚本语言。它大量地借用C、Java 和 Perl 语言的语法,并耦合PHP自己的特性,使WEB开发者能够快速地写出动态产生页面。它支持目前绝大多数数据库。还有一点,PHP是完全免费的,不用花钱,你可以从PHP官方站点自由下载。而且你可以不受限制地获得源码,甚至可以从中加进你自己需要的特色。PHP脚本语言的文件后缀名是.php JSP JSP是Sun公司推出的新一代网站开发语言,Sun公司借助自己在Ja.
asp.net 常用控件命名规则
<br /><br />控件名<br />简写<br />控件名<br />简写Web 窗体Label<br />lblTextBox<br />tbButton<br />btnLinkButton<br />lbHyperLink<br />hlRepeator<br />rptImageButton<br />ibDropDownList<br />ddlListBox<br />lbDataGrid<br />dgDataList<br />dlCheckBox<br />cbCheckBoxLis
asp.net2.0中获得web.config中数据库连接字符串的2种方法
在ASP.NET开发中,我们经常要用到数据库的连接字符串,下面是我经常用的用来获取web.config中数据库连接字符串的2种方法Web.Config中的连接字符串:connectionStrings> add name="WebJakeCS" connectionString="server=202.197.79.159;database=WebJake;uid=WebJake;p
ASP.NET Web Pages - 添加 Razor 代码
ASP.NET Web Pages Razor语法速查指南 本文整理了经典ASP.NET Web Pages项目中常用的Razor语法,包含7种基础语法、内置对象用法、数据库操作、表单处理、文件上传、布局页实现和会员系统开发。所有代码示例可直接用于.cshtml文件,无需控制器或PageModel。特别适合2010-2016年老项目的维护工作,提供从基础输出变量到完整登录系统的完整代码片段,是Web Pages开发者的实用速查手册。
ASP.NET Web Pages - WebSecurity 对象
ASP.NET Web Pages WebSecurity 对象实战指南 WebSecurity 是 ASP.NET Web Pages 内置的会员系统解决方案,可快速实现注册、登录、密码加密等功能。通过简单的代码配置即可完成: 初始化:自动创建用户表和角色表 数据库连接:支持 SQL Server/MySQL 等 核心功能: 注册/登录(自动加盐加密) 记住登录状态 角色权限管理 密码找回 常用方法:如 Login()、Logout()、CreateUserAndAccount() 等 生产级控制:通过
ASP.NET Web Forms - ArrayList 对象
摘要: 2025年传统企业仍广泛使用ASP.NET Web Forms的ArrayList对象维护老旧系统。本文提供企业级实战指南,对比ArrayList与List<T>的差异,列举15种核心操作方法(增删改查、排序遍历等),并详解5大经典场景(动态报表、购物车、权限菜单等)。针对老项目特点,给出防崩溃、类型判断等最佳实践,配套提供20+真实案例源码包(含购物车、报表导出等),帮助开发者快速接手遗留系统。掌握这些技巧可成为企业稀缺的老系统维护专家,实现薪资提升。
ASP.NET中常用功能代码总结——文件操作篇
一.读取文本文件 1/**//// 2/// 读取文本文件 3/// 4private void ReadFromTxtFile() 5{ 6 if(filePath.PostedFile.FileName != "") 7 { 8 txtFilePath =filePath.PostedFile.FileName; 9 fileExtName =
WEB编程开发常用的代码
1. ASP与Access数据库连接: dim conn,mdbfile mdbfile=server.mappath("数据库名称.mdb") set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};uid=admin;pwd=数据库密码;dbq
收集的C#常用类代码
//--方法using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;...
一些ASP初学者常用的代码
1.获得系统时间: 1.获得系统时间:2.取得来访用的IP:3.获得系统,浏览器版本:window.document.write("版本:"+navigator.appName+navigator.appVersion+" browser.")4.去除IE混动条:5.进入网站,跳出广告:window.open(http://www.XXXXXX.com',,h
【ASP】常用函数一
'********************************************************************************************** '函数名称: ZeroFill(Num,Num_Length) '函数功能: 前面补0 '参数说明: Num 要操作的数字 ' Num_Length 显示的位数 '返回值 : 格式化的字符串
1883



被折叠的 条评论
为什么被折叠?



