Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Execute the function I wrote in C # by changing the value (input)

How can I execute the function I wrote inside the c # code when I change the input value?

<input id="quantity2" runat="server" type="number" onserverclick="lod_gheymat" value="" min="1" max="20" />
 protected void lod_Price(object sender, EventArgs e)
    {
 lbl_Plural.Text = quantity2.Value;
}

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Use a asp:Textbox instead of an input control with ‘runat=server’.
Then set the property AutoPostback to true, and handle the event ‘OnTextChanged’.

See: https://meeraacademy.com/textbox-autopostback-and-textchanged-event-asp-net/ for an example.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading