asp.net语句
1、控制GridView控件中内容的换行
GridView1.Attributes.Add("style","word-break:keep-all;word-wrap:normal");//正常换行
GridView1.Attributes.Add("style","word-break:break-all;word-wrap:break-word");//自动换行
2、删除GridView控件行信息弹出确认提示框
在GridView的RowDataBound()事件中添加如下代码:
if(e.Row.RowType==DataControlRowType.DataRow)
{
((LinkButton)(e.Row.Cells[列数])).Attributes.Add("onclick","return confirm('确定要删除吗?')");
}
3、为DataList中的控件赋值
Label lblSelect = (Label)DataList1.Items[行号].FindControl("Label2");
lblSelect.Text = "";
相关文档:
平台:vs2005,ecc6 ,orcale 数据库
1.首先用se37,建立一个读取函数,如图
2.先添加三个com组件Interop.SAPFunctionsOCX.dll,Interop.SAPLogonCtrl.dll,Interop.SAPTableFactoryCtrl.dll
下面的代码我是转载其他网站,
以web形式对function module进行调用与form形式基本一样,唯一值得注意的地方就是:"An ActiveX control ......
在ASP.NET 2.0 WE站点上,我们可以通过在web.config文件中加入下面的节点来支持条件编译。
<compilers>
<compiler language="c#" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
extension ......
ASP.NET程序中常用的三十三种代码
1. 打开新的窗口并传送参数:
传送参数:
response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")
接收参数:
string a = Request.QueryString("id");
string& ......
public void MyGetDepart()
{
string sSql = @"select DepartId,DepartName as '清华附中',ParentId from sDepart";
DataTable table = CommClass.GetDataTable(sSql);//BoolDAL.DbHelper.GetDataTabl ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Pub 的摘要说明
/// </summa ......