摘要:
后台代码:View Code 1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!IsPostBack) 4 { 5 databind(); 6 } 7 8 } 9 public void databind()10 {11 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ToString());12 SqlCommand cmd = new SqlCommand();13 c 阅读全文
摘要:
后端代码:后端代码 1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!IsPostBack) 4 { 5 databind(); 6 } 7 8 } 9 public void databind()10 {11 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ToString());12 SqlCommand cmd = new SqlCommand();13 cmd.Co 阅读全文
摘要:
前端代码:JS代码 1 function Test(aa) 2 { 3 document.getElementById("img1").src ="Image/"+aa; 4 document.getElementById("div1").style.display='block'; 5 document.getElementById("div1").style.position='absolute'; 6 var x = event.clientX; 7 var y = event 阅读全文
摘要:
前台代码:JS代码 1 <script language="javascript" type="text/javascript"> 2 function Test(name,companyName,contactName,contactTitle,address) 3 { 4 var x = event.clientX; 5 var y =event.clientY; 6 document.getElementById("td1").innerText ="姓名:"+name; 7 document.g 阅读全文
摘要:
后台代码:后台代码 1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!IsPostBack) 4 { 5 databind(); 6 } 7 } 8 public void databind() 9 {10 SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ToString());11 SqlCommand cmd = new SqlCommand();12 cmd.Conn 阅读全文
摘要:
在Gridview模板中编辑的操作,在正常的现实状态下,应该使用的是:<ItemTemplate></ItemTemplate>模板(非编辑状态),在启动编辑状态时候,使用<EditItemTemplate></EditItemTemplate>,前台代码如下:前台代码 1 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" 2 onrowcancelingedit="GridVi 阅读全文
摘要:
Gridview自定义编辑操作,利用属性CommandName,CommandArgument来实现这种编辑的操作,对于更新,编辑,修改,取消,CommandName都有固定的关键字,分别为Update,Edit,Cancel.前台代码如下:View Code 1 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" 2 onrowcancelingedit="GridView1_RowCancelingEdit" 3 阅读全文