asp.net-ajax

How to call function on timer ASP.NET MVC

只愿长相守 提交于 2019-11-27 09:20:58
问题 I need to call function on timer (lets say onTickTack() function) and reload some info in ASP.NET MVC project. I know that there are several ways to do that, but which one is the best by your opinion? Note: the function should be called from one place only, and should be called every X mins till application is up. EDIT 1: Reload some info - for example I have something in the Cache and I want to update it from DB on timer - once a day in certain time. 回答1: The answer to this question would

jQuery Dialog-Postback but UpdatePanel doesn't get updated

走远了吗. 提交于 2019-11-27 09:17:11
i want to show a jQuery UI Dialog from Codebehind and need to refresh it after postbacks. The dialog is a control to filter and find data. So the user selects from DropDownLists and enters text in TextBoxes, clicks a "Apply-Button", an asynchronous postback happens, the data gets filtered according to the user's selection and the result will be shown in a GridView. Therefore i need to update the UpdatePanel around the GridView. The asynchronous postback works with help from these links: jQuery UI Dialog with ASP.NET button postback http://blog.roonga.com.au/2009/07/using-jquery-ui-dialog-with

how to submit query to .aspx page in python

坚强是说给别人听的谎言 提交于 2019-11-27 07:07:12
I need to scrape query results from an .aspx web page. http://legistar.council.nyc.gov/Legislation.aspx The url is static, so how do I submit a query to this page and get the results? Assume we need to select "all years" and "all types" from the respective dropdown menus. Somebody out there must know how to do this. As an overview, you will need to perform four main tasks: to submit request(s) to the web site, to retrieve the response(s) from the site to parse these responses to have some logic to iterate in the tasks above, with parameters associated with the navigation (to "next" pages in

How to post ASP.NET MVC Ajax form using JavaScript rather than submit button

自闭症网瘾萝莉.ら 提交于 2019-11-27 06:33:35
I have a simple form created using Ajax.BeginForm : <% using (Ajax.BeginForm("Update", "Description", new { id = Model.Id }, new AjaxOptions { UpdateTargetId = "DescriptionDiv", HttpMethod = "post" },new {id ='AjaxForm' })) {%> Description: <%= Html.TextBox("Description", Model.Description) %><br /> <input type="submit" value="save" /> <% }%> The controller is wired up and returns a partial view that updates the DescriptionDiv . And it all works neatly. Now I would like to be able to submit this form without having the submit button (via a clik on a link or on an image or whatever).

How to Install NeatUpload?

感情迁移 提交于 2019-11-27 06:33:00
问题 Salvete! Whilst searching for a quality, free asp.net/ajax upload control, I found NeatUpload. I cannot find an online demo for it, but the download package does come with a demo. I need some help installing it on my server (Windows Server 2008). I followed the directions at http://mumblestiltskin.blogspot.com/2009/10/using-neatupload-simple-setup.html (they are basically the same as the directions in the manual.htm that comes with the NeatUpload binary package). So far, I have Successfully

Pagemethods in asp.net

人走茶凉 提交于 2019-11-27 05:07:07
My Pagemethod implementation is not working in Chrome browser. I have ASP.NET 3.5 web application developed in VS 2008. The code below not working in chrome or Safari: function FetchDataOnTabChange(ucName) { PageMethods.FetchData(ucName, OnSuccessFetchDataOnTabChange, OnErrorFetchDataOnTabChange); } function OnErrorFetchDataOnTabChange(error) { //Do something } function OnSuccessFetchDataOnTabChange(result) { //Do something } hardba11 This should work in all browsers by following the steps below: The page method must have the System.Web.Services.WebMethod attribute. [WebMethod] The page method

FileUpload control inside an UpdatePanel without refreshing the whole page?

主宰稳场 提交于 2019-11-27 04:48:53
According to Microsoft the FileUpload control is not compatible with an AJAX UpdatePanel. I am aware that a PostBackTrigger can be added to the submit button of the form like this: <Triggers> <asp:PostBackTrigger ControlID="Button1" /> </Triggers> The problem is that this forces the form to perform a full post-back which voids out the whole point of using the UpdatePanel in the first place. Is there a workaround to this issue that does not cause the whole page to refresh? I know of a third party component that can do that. It's called " swfupload " and is free to use and open source, and uses

Reset scroll position after Async postback - ASP.NET

*爱你&永不变心* 提交于 2019-11-27 04:19:49
What is the best way to reset the scroll position to the top of page after the an asynchronous postback? The asynchronous postback is initiated from a ASP.NET GridView CommandField column and the ASP.NET update panel Update method is called in the GridView OnRowCommand. My current application is an ASP.NET 3.5 web site. EDIT: I have received excellent feedback from everyone, and I ended using the PageRequestManager method in a script tag, but my next question is: How do I configure it to only execute when the user clicks the ASP.NET CommandField in my GridView control? I have other buttons on

Thread Safety in Javascript?

二次信任 提交于 2019-11-27 04:18:47
问题 I have a function called save(), this function gathers up all the inputs on the page, and performs an AJAX call to the server to save the state of the user's work. save() is currently called when a user clicks the save button, or performs some other action which requires us to have the most current state on the server (generate a document from the page for example). I am adding in the ability to auto save the user's work every so often. First I would like to prevent an AutoSave and a User

jQuery FancyBox with Ajax

蓝咒 提交于 2019-11-27 04:08:12
问题 I have look at many web sites and many pages on Stackoverflow, but none of them has solved my problem yet. Simply, I have a hyperlink and I want to retrieve an image from database via Ajax call and then display it on FancyBox popup. I also tried many different combinations of Javascript and Controller action methods, but have not managed so display the downloaded file properly. Could you please have a look at my code and give a working example containing all the necessary methods in View and