How will U encapsulate button trigger event into text_box
event of Pressing Enter key?i.e only after pressing Enter
after the text is typed the button trigger event should
activate?
Answer Posted / srinu
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server" >
<div>
<asp:Button ID="Button1" runat="server"
Text="Button" onclick="Button1_Click" />
<asp:TextBox ID="TextBox1" runat="server"
ontextchanged="Button1_Click"></asp:TextBox>
<asp:Label ID="Label1" runat="server"
Text="Label"></asp:Label>
</div>
</form>
</body>
</html>
-------------------------
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "change";
}
if please answer is correct or wrong please inform
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is xor operator in c#?
What are the extension methods in c#?
Is c# int immutable?
Why is c# used?
What are data types examples?
Explain copy constructor?
What is reflection in c#?
What is wpf application in c#?
Is a dll an assembly?
What is func c#?
What is concrete class in c# with example?
What is concrete method in c#?
What do you understand by an Implicit Variable?
How to declare a property in a class?
What is an extension method in c#?