命令控件怎么自动生成对应的函数呢
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="addliuyan.aspx.cs" Inherits="addliuyan" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head runat="server">
<title>添加留言</title>
</head>
<body style="font-size: 12pt">
<form id="form1" runat="server" >
<div>
<asp:Menu ID="Menu1" runat="server" Font-Size="Large" ForeColor="#8080FF" Height="37px" Orientation="Horizontal" Width="287px">
<Items>
<asp:MenuItem NavigateUrl="~/welcom.aspx" Text="主页" Value="主页"></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/addliuyan.aspx" Text="添加留言" Value="添加留言" ></asp:MenuItem>
<asp:MenuItem NavigateUrl="~/viewliuyan.aspx" Text="查看留言" Value="管理留言"></asp:MenuItem>
</Items>
</asp:Menu>
<span style="color:#009966">
<span style="background-color:#ffccff">通过该页面添加新留言到数据库,单击”添加“按钮添加!!!</span>
<br />
</span>
</div>
<asp:Panel ID="Panel1" runat="server" Height="333px" Width="557px" BorderColor="Red" BorderStyle="Dashed" BorderWidth="1px">
<asp:Label ID="Label1" runat="server" Text="留言者:"></asp:Label>
<asp:TextBox ID="tbName" runat="server" Width="189px"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="标题:" Width="63px"></asp:Label>
<asp:TextBox ID="tbTitle" runat="server" Width="476px"></asp:TextBox>
<br />
<hr />
<asp:Label ID="Label3" runat="server" Text="内容:" Width="63px"></asp:Label>
<br />
<asp:TextBox ID="tbContent" runat="server" Height="192px" Width="539px"></asp:TextBox>
<br />
<asp:Label ID="lbHint" runat="server" ForeColor="red"></asp:Label>
<br />
<asp:Button ID="btnAdd" runat="server" BackColor="#FFC080" BorderColor="#C0FFC0" BorderStyle="Ridge" Font-Bold="true" Font-Names="宋体" Font-Overline="false" Font-Size="Large" OnClick="btnAdd_Click" Text="留言"
Width="112px" />
</asp:Panel>
<br />
</form>
</body>
</html>
上面的代码中有OnClick="btnAdd_Click"事件,怎么在后台代码中自动生成对应的代码呢?谢谢了。