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

ASP.NET常用语句

1.//弹出对话框.点击转向指定页面
Response.Write(" <script>window.alert('该会员没有提交申请,请重新提交!')
</script>");
Response.Write(" <script>window.location
='http://www.51aspx.com/bizpulic/upmeb.aspx' </script>");
2.//弹出对话框
Response.Write(" <script language='javascript'>alert('产品添加成功!')
</script >");
3.//删除文件
string filename ="20059595157517.jpg";
pub.util.DeleteFile(HttpContext.Current.Server.MapPath("../file/")
+filename);
4.//绑定下拉列表框datalist
System.Data.DataView dv=conn.Exec_ex("select -1 as code,'请选择经营模式'
as content from dealin union select code,content from dealin");
this.dealincode.DataSource=dv;
this.dealincode.DataTextField="content";
this.dealincode.DataValueField="code";
this.dealincode.DataBind();
this.dealincode.Items.FindByValue(dv[0]["dealincode"].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=\&quot;pushproduct.aspx?
dl=&quot;+DataBinder.Eval(Container.DataItem,&quot;code&quot;)
+&quot;\&quot;>&quot;+&a


相关文档:

ASP.NET Routing for URLRewriting with QueryStrings

In the last post I showed how to use the ASP.NET 3.5 Routing Engine
for URLRewriting purposes. I want to go further in this post by adding
the ability to add variables into a route path and forward and append
query string variables to the destination Web Form request.
A route can contain one or ......

Asp.Net设置绑定GridView中的控件

 1、界面代码:         
  <asp:GridView ID="gridTemplateDetailList" runat="server"
                   AutoGenerateColumns="False"
  &nbs ......

ASP.NET页面刷新的实现方法

先看看ASP.NET页面刷新的实现方法:
第一:
C# code
private void Button1_Click( object sender, System.EventArgs e )
{
Response.Redirect( Request.Url.ToString( ) );
}
第二:
C# code
private void Button2_Click( object sender, System.EventArgs e )
{
Response.Write( " < script langua ......

asp.net身份验证和授权

login.aspx HTML代码
 1<%@ Page language="c#" Codebehind="02Login.aspx.cs" AutoEventWireup="false" Inherits="身份验证._02Login" %>
 2<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
 3<HTM ......

40条ASP.NET开发Tip

2010-01-25 14:24
40条ASP.NET开发Tip
作者:麒麟   来源:博客园   发布时间:2010-01-21 13:16   阅读:287 次  原文链接   [收藏]  
1、在compilation 下,请设置debug=false ,如下:
default Language="c#" debug="false">
2、请使用Server.Tran ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号