摘要:
protected void gvList_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e){ if (e.Row.RowType == DataControlRowType.DataRow)e.Row.Cells[3].Text = e.Row.Cells[3].Text.Replace("\r\n", "<br>");} 阅读全文
摘要:
protected void gvList_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e){ if (e.Row.RowType == DataControlRowType.DataRow)e.Row.Cells[3].Text = e.Row.Cells[3].Text.Replace("\r\n", "<br>");} 阅读全文
摘要:
已知dr为某DataRow,1)如果从数据库读出来的值为null,在后台代码中可以这样判断:dr["fieldname"] is System.DBNull,而不是dr["fieldname"] == null。2)给DataRow的某字段赋空值,使用:dr["fieldname"] = System.DBNull.Value; 阅读全文
摘要:
js:<scriptlanguage="javascript"type="text/javascript">functionvalidateChklst(source,args){//验证CheckBoxList必须选择且只能选择一个varobj=document.getElementById('<%=chklstConclusion.ClientID%>');vari,k=0,isCheck=false;vartags=obj.all.tags('input');varn=tags.length; 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--protectedvoidddlDw_SelectedIndexChanged(objectsender,EventArgse){DropDownListddlDw=senderasDropDownList;GridViewRowgvRow=ddlDw.NamingContainerasGridViewRow;CheckBoxListchklXdzz=gvRow.FindControl("chkl 阅读全文
摘要:
gvList.Attributes.Add("style", "word-break:break-all;word-wrap:break-word"); 阅读全文
摘要:
script type="text/javascript" Array.prototype.indexOf = function (str) { for (var i = 0; i this.length; i++) { if (str == this[i]) { return i; } } return -1; }/script 阅读全文
摘要:
AspxCallBack控件的CallBack事件1)不能弹出窗口;2)取AspxDropDownList控件客户端的值使用 ddl.ClientValue,而不是 ddl.Value;3)给控件的Text属性赋值无效,并不会改变页面上该控件呈现的值;如果需要改变,需在AspxCallBack控件客户端的CallbackComplete事件内修改控件客户端的Text值,如txtName.SetTe... 阅读全文
摘要:
js中可以使用Math.round实现整数的四舍五入,如果需要实现精确到小数点多少位则需要编写自定义函数。方法一:function round(v,e) { var t=1; for(;e>0;t*=10,e--); for(;e<0;t/=10,e++); return Math.round(v*t)/t; } 参数里的: v表示要转换的值 e表示要保留的位数注意:如果使用用户控件,... 阅读全文
摘要:
方法一:<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Bind("MeetingName") %>'NavigateUrl='<%# "~/Webpages/MeetingInfo.aspx?MeetingID="+Eval("MeetingID") %>' ></asp:HyperLink... 阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-t... 阅读全文
|