refresh

Refresh ASP.NET Role Provider

我只是一个虾纸丫 提交于 2019-12-07 12:16:14
问题 simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is there any way in which I can somehow "refresh" the provider without forcing the user to log out of the site and log back in? I'm looking for something that would be akin to a fictional method Roles.Refresh() Specifically, I am looking at this for if an administrator changes a user's roles, the user sessions could maybe refresh themselves every 10 minutes or something. 回答1: I assume you have something like

Refreshing Windows program when other users make changes?

删除回忆录丶 提交于 2019-12-07 11:58:54
问题 Scenario: 4 users launch separate instances of the same client program (Winforms) that is connected to a database based To-Do list. The first user selects the 3rd To-Do list item. How do I update/refresh the other 3 users screens to reflect that item #3 is no longer available? My thought was a table that contains the last update date-time stamp. Then a timer would check every few seconds to see if there have been any changes. UPDATE1: Thanks to all - there are definitely a number of valid

Update properties of a kivy widget while running code

倾然丶 夕夏残阳落幕 提交于 2019-12-07 10:03:54
问题 I want to update the properties of a kivy widget while running something... Example: class app(App): def build(self): self.layout = Layout() self.name = Label(text = "john") self.layout.add_widget(self.name) return self.layout def update(self): for i in range(50): #keep showing the update self.name.text = str(i) #maybe some sleep here obj = app() obj.run() obj.update() This is gonna show me only the final result of the loop. I'd like to keep updating the label.text while the loop goes. I

Asp.Net Button Event on refresh fires again??? GUID?

蓝咒 提交于 2019-12-07 09:52:34
The obvious issue here is that on refresh a button event is recalled and duplicate posts are created in the database. I have read other questions on this site about the very same issue. Apparently the answer is for every post create a GUID and check to make sure the GUID is unique? I am not really sure how to implement this. Does that mean on refresh, it will try and create a duplicate post with the same GUID? How do you implement a GUID into your database? Or if this is not the answer, what is? Thank you! The idea is that you create a unique number for the form, and when the form is posted

Auto Refresh document title?

不羁的心 提交于 2019-12-07 08:20:30
问题 I have tried many ways to have the page title automatically update every 3 seconds so the title can display how many unread messages they have. Here is what I have tried: setInterval(function() { document.title = "<?php echo $inboxcc; ?>"; }, 3000); and $(function() { setInterval(function() { $(this).attr("title", "<?php echo $inboxcc; ?>"); }, 3000); }); But none of them work. 回答1: This approach won't work. Your PHP statement will execute once on the server-side, so no matter what you do in

How to destroy cookies on page refresh

别说谁变了你拦得住时间么 提交于 2019-12-07 06:55:00
问题 Hello I need to destroy javascript cookies on a page refresh. I need to set a new bunch of cookies on every page load which help me render the web page based on user options. Is there a method to destroy cookies on a page refresh?? 回答1: May be you could remove cookies on page unload. For example, with jQuery: $(window).unload(function() { //Destroy cookies here }); 回答2: You need to detect the page refresh, have a look at: Detecting Page Refreshes :: Using JavaScript on Client-Side Once you

Automatically refresh page when Dart source files change

拥有回忆 提交于 2019-12-07 06:24:36
问题 How can you make Dartium automatically reload your web client application whenever a change is made to the source files? Related: How do I make Firefox auto-refresh on file change? 回答1: EDIT: You can also skip all this and simply hit CTRL+R in the Editor. The script below may still be useful if you're using tooling outside of the Dart Editor (but are still relying on it for the build process) or want to code-and-preview without focus shifting to the Dartium window. Cut out keystrokes and

Android Background Service vs AlarmManager

亡梦爱人 提交于 2019-12-07 05:56:40
问题 Can someone give a little bit briefing or perhaps more elaborate details on differences Android background service with Alarm Manager? How they differ? And in which situation I should use each? I am developing an application that need to download data from Web Service at periodic time. The application has few modules and each modules has different interval time period to download / sync the data to Web Service. Let say + Module A need to sync in every 15 mins + Module B need to sync in every

PHP avoid browser reposting $_POST on page refresh?

£可爱£侵袭症+ 提交于 2019-12-07 02:32:32
问题 I wonder what are the techniques i can use to avoid users to post form twice when they refresh page and chose submit again? e.g. i have form inside regiter.php and process it as well inside register.php. 1st i could process in another file e.g. register_process.php and redirect to register.php, but then i have to create about 20 new pages and relocate a lot of code, i dont want that option. 2nd i could play with headers i dont remember exact trick but had some bad experience with that - users

How to dynamically refresh a .NET databound repeater control

不问归期 提交于 2019-12-07 01:10:27
问题 I have a .NET repeater control that is data-bound to a List. As part of the Repeater's Item Collection , I have a "Remove Button" that effectively removes this current List element. This works, in code-behind I can successfully remove an item from the datasource of the Repeater . My problem is this : when I reset the updated datasource and call MyRepeater.DataBind() again, the Repeater interface does not refresh with the Item removed. I am looking for the event to essentially redraw or