c# - Displaying a result in a textbox on a button click (ASP.Net) -
i new asp.net , simple scenario:
currently in web application have 1 button , 1 textbox in web application. when click button want display result in text box.
how should this?
if you're using asp.net webforms can add click event handler button set text box's text:
protected void button1_click(object sender, eventargs e) { mytextbox.text = "text display"; }
you can either use autowireup event handler wired button, or explicitly assign event handler event in page_load() method.
the easiest way assign event button declare in .aspx code this:
<asp:button id="button1" runat="server" onclick="button1_click" text="button" />
it done automatically if doubleclick button in designer mode.
Comments
Post a Comment