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

《ASP.NET常用语句1 20条》

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,"begtime"
.ToString()).ToShortDateString()%>
6.//标题带链接
<%# " <a class=\"12c\" target=\"_blank\"
href=\"http://www.51aspx/CV/_&amp
;quot;+DataBinder.Eval

(Container.DataItem,"procode"
+".html\">"+
DataBinder.Eval(Container.DataItem,"proname"
+" </a>"%>
7.//修改转向
<%# " <A href=\"editpushpro.aspx?id="+DataBinder.Eval
(Container.DataItem,"code"
+"\">"+"修改
"+" </A>"%>
8.//弹出确定按钮
<%# " <A id=\"btnDelete\" onclick=\"return confirm('你是否
确定删除这条记录吗?');\" href=\"pushproduct.aspx?
dl="+DataBinder.Eval(Container.DataItem,"code"

+"\">"+"删除"+" </A>"%>


相关文档:

ASP.NET AJAX 服务器端编程学习小结

    最近开始了ASP.NET AJAX的全面学习。在服务端编程这块主要有几个服务器控件负责,他们分别为:ScriptManager,Timer,UpdatePanel,UpdateProgress.
     先来说说ScriptManager.它有个方法registerAsyncPostBackControl(控件),可以注册页面上的任何控件为异步传送按钮。还有个方法叫 ......

asp.net 4种事务


<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......

asp.net(c#) static关键字用法小结

静态变量
       当我们编写一个类时,其实就是在描述其对象的属性和行为,而并没有产生实质上的对象,只有通过new关键字才会产生出对象,这时系统才会分配内存空间给对象,其方法才可以供外部调用。
       有时候,我们希望无论是否产生了对象或无论 ......

谨慎Asp.net中static变量的用法

谨慎Asp.net中static变量的用法
.Net技术 2007-01-30 22:17:37 阅读925 评论11 字号:大中小
谨慎Asp.net中static变量的用法
    在.Net平台下进行CS软件开发时,我们经常遇到以后还要用到某些变量上次修改后的值,为了简单起见,很多人都习惯用static来定义这些变量,我也是。这样非常方便,下一次调用某个 ......

asp.net c#数据库还原

public partial class shujuku_huanyuan : System.Web.UI.Page
{
    SqlConnection conn =  new SqlConnection(@"server=HUAZD-33\XXD33;uid=sa;pwd=111111;database=master;");
   
    protected void Page_Load(object sender, EventArgs e)
  &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号