摘要:第一:private void Button1_Click( object sender, System.EventArgs e ){ Response.Redirect( Request.Url.ToString( ) );}第二:private void Button2_Click( object sender, System.EventArgs e ){ Response.Write( " <script language=javascript>window.location.href=document.URL; </script>" );}第
阅读全文
摘要:<ahref="javascript:showModalDialog('EquipmentTypeAdd.aspx?isAdd=1');window.location.reload()"style="text-decoration:none;"><divclass="on_out"onmousemove="this.className='on_mov'"onmouseout="this.className='on_out'">
阅读全文
摘要:在RowDataBound事件中加入如下代码protectedvoidgv_projectDocumentView_RowDataBound(objectsender,GridViewRowEventArgse){if(e.Row.RowType==DataControlRowType.DataRow){//鼠标经过时,行背景色变e.Row.Attributes.Add("onmouseover","this.style.backgroundColor='#00A9FF'");//鼠标移出时,行背景色变e.Row.Attributes.A
阅读全文
摘要:许多时候我们在制作表单时需要限制文本框输入内容的类型,下面我们用正则表达式限制文本框只能输入数字、小数点、英文字母、汉字等各类代码。 1.文本框只能输入数字代码(小数点也不能输入) <input onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"> 2.只能输入数字,能输小数点. <input onkeyup="if(isNaN(value
阅读全文
摘要:/Files/computer-lzy/AspNetOnlineZIP2.0_51aspx.rar
阅读全文
摘要:HTML:<%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="GridView.aspx.cs"Inherits="RGY_WebApp.GridView"%><!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><ht
阅读全文
摘要:publicstaticvoidMergeRows(GridViewgridView){for(introwIndex=gridView.Rows.Count-2;rowIndex>=0;rowIndex--){GridViewRowrow=gridView.Rows[rowIndex];GridViewRowpreviousRow=gridView.Rows[rowIndex+1];for(intcellIndex=0;cellIndex<row.Cells.Count;cellIndex++){if(row.Cells[cellIndex].Text==previousRow.
阅读全文