<%...@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Theme="default"%> 2 3<%...@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> 4 5<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 6<html xmlns="http://www.w3.org/1999/xhtml"> 7<head runat="server"> 8 <title>Untitled Page</title> 9</head> 10<body> 11 <form id="form1" runat="server"> 12 <asp:ScriptManager ID="ScriptManager1" runat="server" /> 13 <div> 14 <asp:UpdatePanel ID="UpdatePanel1" runat="server"> 15 <ContentTemplate> 16 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID" 17 DataSourceID="SqlDataSource1"> 18 <Columns> 19 <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False" 20 ReadOnly="True" SortExpression="CategoryID" /> 21 <asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" /> 22 <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /> 23 <asp:TemplateField> 24 <ItemTemplate> 25 <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/btn_edit.gif" 26 OnClick="ImageButton1_Click" /> 27 </ItemTemplate> 28 </asp:TemplateField> 29 </Columns> 30 </asp:GridView> 31 <asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="Add" /><br /> 32 33 <asp:Button ID="Button3" runat="server" Text="Button" Width="275px" Style="display: none" mce_Style="display: none" /> 34 <cc1:modalpopupextender id="ModalPopupExtender1" runat="server" targetcontrolid="Button3" PopupControlID="Panel1" Drag="true" BackgroundCssClass="modalBackground"></cc1:modalpopupextender> 35 36 <asp:Panel ID="Panel1" runat="server" CssClass="modalBox" Style="display: none;" mce_Style="display: none;" Height="96px" Width="347px"> 37 <asp:HiddenField ID="HiddenField1" runat="server" /> 38 <table> 39 <tr> 40 <td style="width: 100px"> 41 Name:</td> 42 <td style="width: 128px"> 43 <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></td> 44 </tr> 45 <tr> 46 <td style="width: 100px"> 47 Description:</td> 48 <td style="width: 128px"> 49 <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td> 50 </tr> 51 <tr> 52 <td style="width: 100px"> 53 </td> 54 <td style="width: 128px"> 55 <asp:Button ID="Button1" runat="server" Text="Save" OnClick="Button1_Click" /> 56 <asp:Button ID="Button2" runat="server" Text="Cancel" /></td> 57 </tr> 58 </table> 59 </asp:Panel> 60 </ContentTemplate> 61 </asp:UpdatePanel> 62 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 63 SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]" UpdateCommand="UPDATE Categories SET CategoryName = @name, Description = @des WHERE (CategoryID = @id)" InsertCommand="INSERT INTO Categories(CategoryName, Description) VALUES (@name, @des)"> 64 </asp:SqlDataSource> 65 66 </div> 67 </form> 68</body> 69</html> using System; 2using System.Data; 3using System.Configuration; 4using System.Web; 5using System.Web.Security; 6using System.Web.UI; 7using System.Web.UI.WebControls; 8using System.Web.UI.WebControls.WebParts; 9using System.Web.UI.HtmlControls; 10using System.Data.SqlClient; 11//From bbs.51aspx.com 12public partial class _Default : System.Web.UI.Page 13...{ 14 protected void Page_Load(object sender, EventArgs e) 15 ...{ 16 17 } 18 protected void ImageButton1_Click(object sender, ImageClickEventArgs e) 19 ...{ 20 ImageButton btnEdit = sender as ImageButton; 21 GridViewRow row = (GridViewRow)btnEdit.NamingContainer; 22 //this.UpdatePanel1.Update(); 23 this.HiddenField1.Value = row.Cells[0].Text; 24 this.TextBox1.Text = row.Cells[1].Text; 25 this.TextBox2.Text = row.Cells[2].Text; 26 this.ModalPopupExtender1.Show(); 27 } 28 protected void Button1_Click(object sender, EventArgs e) 29 ...{ 30 SqlCommand cmd = null; 31 if ("add" == this.HiddenField1.Value) 32 cmd = new SqlCommand(this.SqlDataSource1.InsertCommand); 33 else 34 cmd = new SqlCommand(this.SqlDataSource1.UpdateCommand); 35 using (cmd) 36 ...{ 37 using (cmd.Connection = new SqlConnection(this.SqlDataSource1.ConnectionString)) 38 ...{ 39 cmd.Connection.Open(); 40 cmd.Parameters.AddWithValue("@name", this.TextBox1.Text); 41 cmd.Parameters.AddWithValue("@des", this.TextBox2.Text); 42 if ("add" != this.HiddenField1.Value) 43 cmd.Parameters.AddWithValue("@id", Convert.ToInt32(this.HiddenField1.Value)); 44 cmd.ExecuteNonQuery(); 45 } 46 } 47 48 this.GridView1.DataBind(); 49 this.ModalPopupExtender1.Hide(); 50 51 } 52 protected void Button4_Click(object sender, EventArgs e) 53 ...{ 54 this.HiddenField1.Value = "add"; 55 this.TextBox1.Text = ""; 56 this.TextBox2.Text = ""; 57 this.ModalPopupExtender1.Show(); 58 } 59}
一.Vue文件內容 <template> </template> <script> </script> <style> </style>
CSDN應該是大家接觸到最多的博客平臺了,所以一款能夠發佈到CSDN的自動化工具還是非常有必要的。 今天給大家講講自動化CSDN博客發佈的思路和一些問題的解決辦法。 解決問題的思路一定是最重要的,知識是死的,問題是活的,如何在工作中解決遇
1.redis未授權訪問漏洞 通過redis未授權訪問漏洞,會造成敏感信息泄露,甚至被利用直接控制服務器,其危害不言而喻。但是在實際工作中,發現一些開發人員和運維人員並不知道如何妥善配置。因此有了本文,對redis的配置,建議就是2條,一
1.hive 1.1 解壓 tar -zxf apache-hive-1.2.2-bin.tar.gz -C .. mv apache-hive-1.2.2-bin/ hive-1.2.2 1.2 修改配置
4月19日,Meta發佈了最新的大語言模型LLaMA3,具體包括一個 8B 模型和一個 70 B 模型,上下文長度支持8K, 被譽爲史上最強開源大語言模型,開源社區的“重磅炸彈”,效果直指GTP4。在諸多評測任務上,LLaMA3都有非常炸裂
操作系統Debian12 1. portainer 簡介 Portainer 是一個開源的輕量級容器管理工具,主要用於 Docker 和 Swarm 環境的可視化管理和操作。通過 Portainer,用戶可以通過簡潔易用的 Web UI
背景 在 MySQL 中,當我們爲表創建了一個或多個索引後,通常需要在索引定義完成後,根據具體的數據情況執行 EXPLAIN 命令,才能觀察到數據庫實際使用哪個索引、是否使用索引。這使得我們在添加新索引之前,無法提前預知數據庫是否能使用期望
MySQL 的鎖也是不少,在哪種情況下會連查詢都能被阻塞?這是一個有意思的問題。 工作中,很多開發和 DBA 可能接觸較多的鎖也就行鎖了。對於行鎖,阻塞寫能理解,阻塞讀實在是想不到。能阻塞讀的那肯定是顆粒度更大的鎖了,比如表級別的。 作者
4月19日,Meta發佈了最新的大語言模型LLaMA3,具體包括一個8B模型和一個70B模型,上下文長度支持8K,被譽爲史上最強開源大語言模型,開源社區的“重磅炸彈”,效果直指GTP4。在諸多評測任務上,LLaMA3都有非常炸裂的效果。8
作者:天彤 Atlassian 在 2020 年官方發佈公告,從 2021 年起停止 Jira Server 產品的銷售,並且在 2024 年徹底停止 Server 端產品的服務支持,這對於國內使用 Jira 產品的企業和研發團隊造成了不小
centos7 安裝 docker 安裝教程可參考:centos7 安裝 docker 開始安裝owncloud 1. 創建一個新的項目目錄 mkdir owncloud-docker-server cd owncloud-doc
MySQL 8.4 LTS 版本,我們一共修改了 20 個 InnoDB 變量的默認值。 作者:Frederic Descamps,EMEA 和亞太地區的 MySQL 社區經理。於 2016 年 5 月加入 MySQL 社區團隊。擔任開源
本文分享自華爲雲社區《華爲雲短信服務教你用Perl實現Smgp協議》,作者:張儉。 引言&協議概述 中國電信短消息網關協議(SMGP)是中國網通爲實現短信業務而制定的一種通信協議,全稱叫做Short Message Gateway Pro
前端面試題 - null是原始類型,但爲什麼typeof null的結果是object? 造成這個結果的原因是null的內存地址是以000開頭,而js會將000開頭的內存地址視爲object。 通過isNull()來判斷一個值是不是null