易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP.NET常用语句1

1.//弹出对话框.点击转向指定页面
Response.Write(&quot; <script>window.alert('该会员没有提交申请,请重新提交!')
</script>&quot;);
Response.Write(&quot; <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>&quot;);
2.//弹出对话框
Response.Write(&quot; <script language='javascript'>alert('产品添加成功!')
</script >&quot;);
3.//删除文件
string filename =&quot;20059595157517.jpg&quot;;
pub.util.DeleteFile(HttpContext.Current.Server.MapPath(&quot;../file/&quot;)
+filename);
4.//绑定下拉列表框datalist
System.Data.DataView dv=conn.Exec_ex(&quot;select -1 as code,'请选择经营模式'
as content from dealin union select code,content from dealin&quot;);
this.dealincode.DataSource=dv;
this.dealincode.DataTextField=&quot;content&quot;;
this.dealincode.DataValueField=&quot;code&quot;;  
this.dealincode.DataBind();
this.dealincode.Items.FindByValue(dv[0][&quot;dealincode&quot;].ToString
()).Selected=true;
5.//时间去秒显示
<%# System.DateTime.Parse(DataBinder.Eval
(Container.DataItem,&quot;begtime&quot;).ToString()).ToShortDateString()%>
6.//标题带链接
<%# &quot; <a class=\&quot;12c\&quot; target=\&quot;_blank\&quot;
href=\&quot;http://www.51aspx/CV/_&quot;+DataBinder.Eval
(Container.DataItem,&quot;procode&quot;)+&quot;.html\&quot;>&quot;+
DataBinder.Eval(Container.DataItem,&quot;proname&quot;)+&quot; </a>&quot;%>
7.//修改转向
<%# &quot; <A href=\&quot;editpushpro.aspx?id=&quot;+DataBinder.Eval
(Container.DataItem,&quot;code&quot;)+&quot;\&quot;>&quot;+&quot;修改
&quot;+&quot; </A>&quot;%>
8.//弹出确定按钮
<%# &quot; <A id=\&quot;btnDelete\&quot; onclick=\&quot;return confirm('你是否
确定删除这条记录吗?');\&quot; href=\&q


相关文档:

如何学习ASP.NET

如何学习ASP.NET
2009-07-24 09:49
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET。
我强烈反对在没系统学过一门面向对象语言的前提下去学ASP.NET。
ASP.NET是一个全面向对象的技术,不懂面向对象,那绝对学不下去!
第二步 对.NET Framework类库有一定的 ......

如何在Asp.net使用模式对话框提交而不打开新窗口?

在项目中我要用到修改密码功能,修改密码页我是用模式对话框的形式弹出来的,当我按正常情况提交数据时,发现它会弹出一个新的窗口来显示修改成功信息,我想提交数据而不打开新窗口,
我的解决办法就是在head标签中加上base标签让target="_self",之前我想得有点复杂,想给它一个固定的alert,当成功修改时才显示 ......

在ASP.NET中下载文件

//TransmitFile实现下载
    protected void Button1_Click(object sender, EventArgs
e)
    {
        /*
       
微软为Response对象提供了一个新的方法TransmitFile来解决使用Response.BinaryWrite
......

ASP.NET中防止页面多次提交的代码实现

此处提供的代码用来实现当asp.net页面中的某个Button被点击后disable掉该页面中所有的Button,从而防止提交延时导致的多次提交。基于之前的onceclickbutton脚本.
//ASP.NET中防止页面多次提交的代码:javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElem ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号