<asp:TextBox ID="ClassName" class="input_1" Width="200" runat="server"></asp:TextBox>
<asp:ImageButton width="123" height="38" ID="ImageButton1" onclick="Button1_Click" runat="server" ImageUrl="images/pic01.gif" />
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("ss");
}在TextBox 里输入随便的字符 然后敲回车 无反应
我不想使用JS 求助
<asp:ImageButton width="123" height="38" ID="ImageButton1" onclick="Button1_Click" runat="server" ImageUrl="images/pic01.gif" />
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("ss");
}在TextBox 里输入随便的字符 然后敲回车 无反应
我不想使用JS 求助
FORM肯定是有的 这个你放心啦
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ss</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="Form1" runat="server"><asp:TextBox ID="ClassName" runat="server">
</asp:TextBox>
<asp:Button id="btnOK" runat="server" OnClick="Button1_Click" BorderWidth="1px" Text="sssssssssssssssssssssssssA">
</asp:Button>
</form></body></html>using System;
using System.Text;
using System.Data;
using System.Configuration;
using System.Collections;
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;
using System.Data.SqlClient;public partial class admin_admin_VideoClass_add : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("ss");
Response.End();
}}
求助哇
除非你修改了Designer页面的事件委托.
如果要是敲回车就提交按钮,那你怎么在文本框里面换行。