asp.net-ajax

ajax post not working without alert message

时光怂恿深爱的人放手 提交于 2020-01-05 04:09:09
问题 i have a problem with ajax post function. Ajax function doesn't working without alert message. If add alert message, div content will be refresh and working my code. I have a mv3 application. And post form data to this javascript function. Like that: function Add_Definition() { var data = $.extend({ call: "Add_Definition", url: "/Definition/Definition", type: "post", dataType: "html", data: $("#definition_form").serialize() }, data); Load(ajaxrequest(data)); } function Load(val) { if (val ==

ASP .Net Output Caching and Ajax Control toolkit

心不动则不痛 提交于 2020-01-05 03:58:06
问题 I'd like to know if there's a special way of implementing output caching and using a control from the ajax control toolkit. I keep getting a javascript error on a page with output caching and a tab control that says: ajaxtoolkit (my assembly prefix) is undefined. This is the directive I added: <%@ OutputCache Duration="3600" VaryByParam="none" %> 回答1: Microsoft does not support output caching in combination with ScriptControls, Extenders, or ScriptManagerProxies that need ScriptReferences. A

asp.net page methods returning undefined

浪尽此生 提交于 2020-01-05 03:10:13
问题 I am trying to use page methods in my asp.net page. I have enable page methods set to true on the script manager, the webmethod attribute defined on the method, the function is public static string, I know the function works because when I run it from my code behind it generates the expected result, but when I call it via page method in my result function the result is always alerted as undefined. If I use fiddler it doesn't even look like there is additional traffic or a new request created.

Capture reload/endrequest event after server redirect to download file

痞子三分冷 提交于 2020-01-05 02:59:38
问题 Inside a webpage I have an Excel download button, which redirects to a webpage that serves the requested Excel file via the application/ms-excel MIME type, which usually results in a file download in the browser. In the webpage, I have the following jQuery code: $(document).ready(function () { $(".div-export .button").click(function () { setBusy(true); }); Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () { setBusy(false); }); }); Which displays a busy animation while

Drag and Drop files into a SharePoint webpart to upload into DocLibrary

旧街凉风 提交于 2020-01-04 05:44:29
问题 Is it possible to create a SharePoint (wss3 or MOSS 2007) webpart, to allow files to be dragged and dropped onto it, which would then upload the files into a predefined document library ? I imagine that this would require some form of client side scripting (Ajax ?), but my knowledge in ajax is a bit sketchy. From my exploration so far, I'm thinking: User drags file onto 'drop zone' Webpart. This action triggers some code This code Loads the file into a SharePoint library (like this :

Why is my asp:TreeView selected node reset when in an UpdatePanel?

女生的网名这么多〃 提交于 2020-01-04 04:44:06
问题 I have an asp.net 2.0 page that contains 2 UpdatePanels . The first panel contains a TreeView control, when I select a node in the three view control it triggers an update of the second UpdatePanel only. This much is behaving correctly. There are two buttons on the page outside of an update panel (previous/next). These buttons trigger an update of both panels. The behaviour of the buttons is to select the adjacent node in the tree. The first time I click on one of these buttons I get the

WebDriver Screenshots don't work if an alert is present. how to handle using c#.net?

你。 提交于 2020-01-04 03:54:28
问题 I am using ASP.net, C#.net Intranet application. Selenium Webdriver to test application. one page enter same name it showing alert message "Already Exists" (server side alert using ajax) , I want to capture that alert message with screenshort. **Selenium webdriver version: 2.35.0.0 dotnet frame work: 4.0** i am writing code like bellow : private static void SaveScreenShot(string screenshotFirstName) { var folderLocation = Environment.CurrentDirectory.Replace("\\Out", "") + "\\ScreenShot\\";

Get ASP.NET control which fired a postback within a AJAX UpdatePanel

[亡魂溺海] 提交于 2020-01-03 18:53:03
问题 Related to this question: On postback, how can I check which control cause postback in Page_Init event If the control is wrapped in an ASP.NET AJAX UpdatePanel, the variable "control" is empty because it has a different ID after the AJAX PostBack. Is there a solution to get the control which fired a postback within an ASP.NET Ajax UpdatePanel? public static string GetPostBackControlName( Page page ) { Control control = null; /** * First we will check the "__EVENTTARGET" because if the

ASP.NET GridView pagination without postback

你。 提交于 2020-01-03 17:33:13
问题 Just a quick question for all of you guys. I have a Grid View inside Update Panel. My Modal PopUp pulls this Panel up. I am good so far. However when I try to do pagination on the popped up grid view, The page Posts Back. Then the Modal PopUp disappears and so does my GridView. When I click on mybutton again, It shows the Modal PopUp with Grid View and the Next Page Contents in Grid View. Is there any way I can get this Grid View to do pagination without Postback and without losing Modal

Add a realtime progress update to a slow page in asp.net

▼魔方 西西 提交于 2020-01-03 15:58:08
问题 I'm trying to add a realtime progress report to my c#/asp.net 4.0 application for a slow loading page. I've look at the UpdatePanel and UpdateProgress Ajax controls but I don't think they're suitable. Basically when the user click a button the page executes a number of tasks, I'd like the user to see an update as each one completes, instead of a report when they all complete and the page load completes. The order thing would happen would be: 1. user click button to start 2. call method 1 3.