M
M
Maria Popova2016-04-19 21:59:01
ASP.NET
Maria Popova, 2016-04-19 21:59:01

How to update GriView by timer?

There is a task to update ONLY GridView on the page or other element on the page in ASP.NET on the timer???
I saw a page refresh on a timer in JS, but I don’t get how to change it to an element

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Kovalsky, 2016-04-19
@masha_0212

To change only 1 element, AJAX requests are required. Apparently you are using Web Forms - there are 2 controls for it - ScriptManager and UpdatePanel. Actually what lies inside the UpdatePanel is updated asynchronously. dare

E
Espleth, 2015-04-09
@tryvols

Oh, horror, combine buttons into an array and get rid of code duplication
How to make buttons react to events, I won’t tell you exactly now, but I’ll tell you how to look:
Add a simple button to the form. Double click on it. A method for the event will be created in the code, where you will immediately be transferred. We are not interested in this, we are interested in what was created in the automatically generated code (there is a separate file in the form). There for your button there will be something like this.button1.onClick += button1_Click; this is exactly what you need.
In general, you can look at this auto-generated code as a cheat sheet in order to learn how to implement such things.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question