//GridViwe中内容自动换行 GridViwe1.Attributes.Add(“style”, “word-break:break-all;word-wrap:break-word”);
//GridViwe中隐藏列
在 protected void sgvCapitalDetailList_RowDataBound(object sender, GridViewRowEventArgs e)事件中,添加如下代码:
e.Row.Cells[newTable.Columns.Count - 1].Visible = false;
oracle中的函数decode(待比较的对象,如果为这个,那麽结果为这个,否则结果是这个)
SQL分页
select *,ROW_NUMBER() over(order by pid desc) as num from
photos as t where t.num between 4 and 6 order by pid desc
Oracle OCI-22053:溢出错误解决方法
Oracle 数值数据类型最多可存储 38 个字节的精度.当将 Oracle 数值转换为公共语言运行库数据类型时,小数点后边的位数可能过多,这会导致此错误.
解决方法:
使用round()函数:
例如:select min(pval),max(pval),round(avg(pval),5) from hvm_data_dga .
round(avg(pval),5) 使数值小数点后按照四舍五入保留5位.
//设置DropDownList选中的值
this.ddlDepart.SelectedIndex = ddlDepart.Items.IndexOf(ddlDepart.Items.FindByValue(“0”));
输入金额的验证表达式
ValidationExpression=“^\d+(\.\d*)?$” //金额
WdatePicker.js在ie6无法打开我使用的WdatePicker.js日历控件在ie6中无法打开,浏览器报没有站点.
解决办法 Js代码 :.< script src=“/admin/blogs/resources/js/time/WdatePicker.js” type=“text/javascript”></script><script src=“./resources/js/time/WdatePicker.js” type=“text/javascript”></script>在引包的时候,加入defer=“defer” 就好了.
弹出对话框进行操作后刷新父页面
前台代码:
<script type=“text/javascript”>
function Edit(url) {
var openobj = window;
if (typeof (window.dialogArguments) == “object”) {
openobj = window.dialogArguments;
}
showPopWin(url, 800, 700, openobj);
}
</script>
<span class=“chaxun”>
<asp:LinkButton ID=“lbtnSelect” runat=“server” OnClick=“lbtnSelect_Click”>查询</asp:LinkButton>
</span> <span class=“xinzeng”>
<asp:LinkButton ID=“lbtnAdd” runat=“server” OnClick=“lbtnSelect_Click”>新增</asp:LinkButton></span>
</div>
后台代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//为新增按钮添加js事件
lbtnAdd.Attributes.Add(“onclick”, “showPopWindow('QualityValidate.aspx?OperType=Add&btnQuery=” + lbtnSelect.ClientID + “‘,'800','700');”);
BindList();
}
}
发表回复