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 are console applications used for?
What is string programming language?
what is the purpose of using statement in c#
Describe a Struct ?
Can you have an array of arrays?
What is deadlock in c#?
How does split work in c#?
What is c# entity framework?
Why do we need singleton pattern in c#?
Can we declare private class in c#?
What are the types of constructors?
What are mutable and immutable types in c#?
What is command object in c#?
Constructor to an arbitrary base constructor?
What is a lambda expression in c#?