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

ASP.NET常用语句1 20条 非常实用

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('你是否
确定删


相关文档:

Asp.net动态加载用户自定义控件,并转换成HTML代码

Ajax现在已经是相当流行的技术了,Ajax不仅是想服务器端发送消息,更重要的是无刷新的重载页面。
 如果页面单纯的使用js来创建,要写大量的代码,而且不直观。
在asp.net中,其实我们可以创建用户自定义控件,通过Ajax请求返回用户自定义控件HTML代码。
public static string RangerUsControl(string controlName) ......

ASP.NET中解决传递中文参数

1.设置web.config文件.
<system.web>
......
<globalization requestEncoding="gb2312" responseEncoding="gb2312" culture="zh-CN" fileEncoding="gb2312" />
......
</system.web>
 
或者:
aspx文件中:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"&g ......

让ASP.Net HTML页面代码 清爽起来

自从用了 ASP.Net MVC后就喜欢上了它 ,因为MVC对服务器控件的依赖大大减少,它生成的HTML页面就比WebForm清爽多了,加载速度有了明显的改善。
但对于页面中内嵌script,还是不能彻底的避免,如:
<script type="text/javascript" language="javascript">
//<!--
function DepositPa ......

ASP.NET MVC 2的代码以MS PL协议开源发布

微软已经宣布ASP.NET MVC 2的代码以MS-PL协议发布,MS-PL是一个得到OSI认证的开源协议,ASP.NET MVC基于MS-PL发布,是一个真正的开源框架且没有任何平台限制,也就是说,您可以在mono下使用或开发ASP.NET MVC的相关项目。 可以到ASP.NET MVC 2 RTM Download Details page获取源代码,或者到CodePlex上获取,这个页面是微软官 ......

C# asp.net如何使用MD5加密,解密

using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;namespace md5
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(UserMd5("8"));
Console.WriteLine(GetMd5Str("8"));
}
/**//// &lt;summary&gt;
/// MD5 16位加密 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号