asp.net-ajax

How to send/ Upload file without using FORMDATA in jquery ajax

我们两清 提交于 2020-01-23 01:05:30
问题 How to send/Upload file without using FORMDATA in jquery ajax? Because IE does not support FORMDATA... here is the working code... $(document).ready(function () { $("#btnUpload").on("click", function () { var file_data = $("#UploadedFile").prop("files")[0]; // Getting the properties of file from file field var form_data = new FormData(); // Creating object of FormData class form_data.append("file", file_data) // Appending parameter named file with properties of file_field to form_data form

Custom C# data transfer objects from javascript PageMethods

混江龙づ霸主 提交于 2020-01-22 12:32:40
问题 I've created a custom object that I'd like to return in JSON to a javascript method. This object was created as a class in C#. What's the best way to return this object from a PageMethod ([WebMethod] if you like) to a javascript onPageMethodCallback() function? I need to be able to access the properties of this object via javascript and update the DOM according (possibly using jQuery). Thank you StackOverflow! :) 回答1: ASP.NET AJAX on the server side will handle serializing the object for you.

Custom C# data transfer objects from javascript PageMethods

人盡茶涼 提交于 2020-01-22 12:32:13
问题 I've created a custom object that I'd like to return in JSON to a javascript method. This object was created as a class in C#. What's the best way to return this object from a PageMethod ([WebMethod] if you like) to a javascript onPageMethodCallback() function? I need to be able to access the properties of this object via javascript and update the DOM according (possibly using jQuery). Thank you StackOverflow! :) 回答1: ASP.NET AJAX on the server side will handle serializing the object for you.

How do you measure the progress of a web service call?

你说的曾经没有我的故事 提交于 2020-01-20 08:06:46
问题 I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to call this web service from a web page, and want some mechanism which will allow me to keep polling the server so that i can i can show some indicator of progress on the screen, like say, the number of files that have

How do you measure the progress of a web service call?

百般思念 提交于 2020-01-20 08:03:28
问题 I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to call this web service from a web page, and want some mechanism which will allow me to keep polling the server so that i can i can show some indicator of progress on the screen, like say, the number of files that have

How do you measure the progress of a web service call?

断了今生、忘了曾经 提交于 2020-01-20 08:03:12
问题 I have an ASP.NET web service which does some heavy lifting, like say,some file operations, or generating Excel Sheets from a bunch of crystal reports. I don't want to be blocked by calling this web service, so i want to make the web service call asynchronous. Also, I want to call this web service from a web page, and want some mechanism which will allow me to keep polling the server so that i can i can show some indicator of progress on the screen, like say, the number of files that have

URL Rewrites create compatibility issue with AjaxToolkit

戏子无情 提交于 2020-01-17 04:49:28
问题 I'm using the latest AjaxControlToolKit v15.1.3 and using the ... ajaxtoolkit:calendarextender for popping up the calender tool on click. everything works fine enough till there. now, when i add the URL rewrite code on the web.config file, the pop up on click no longer happens. any specific edit on the code i need to update for both to work. Here is the URL rewrite code: <rewrite> <rules> <rule name="RewriteASPX"> <match url="(.*)" /> <conditions logicalGrouping="MatchAll"> <add input="

Downloading photos on the client side every 10 seconds on an ajax enabled asp.net environment?

谁都会走 提交于 2020-01-17 01:41:14
问题 There is a web site page which is coded on asp.net with using c# and ajax is enabled too. I want a very fast loading web page; which is going to happen with the following architecture; 1- First all data is shown by the text boxes (There are 50 text boxes, it is an application form.) 2- When the web Page is requested and loaded, then I want all the photos are shown near the each text boxes 10 by 10 from top of the page till the end of it. (Each photo is between 5 kb - 20 kb; ) I know

Modify <head> from ASP.NET AJAX

北城以北 提交于 2020-01-16 02:54:29
问题 I have recently upgraded to ASP.NET AJAX application. I have two css files in an ASP.NET theme. I use any one of the css per postback depends upon a condition. Previously with my non-AJAX ASP.NET application, what I used to do is protected void Page_PreRender(object sender, EventArgs eventArgs) { ControlCollection headCollection = Header.Controls; for (int i = 0; i < headCollection.Count; i++) { Control temp = headCollection[i]; if (temp is HtmlLink) { if (/* condition to loads a.css */) { if

IE 8.0 Escape Key Issue Web Forms

为君一笑 提交于 2020-01-15 10:32:15
问题 One of my QA Team just discovered the following: If you hit ESC twice when on a page containing an update panel with a control inside, if you click on anything else that does a postback, you'll get a System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using [...] error. I would like to know more about the default behaviour of the ESC key. And might be interested in hooking up to the event to fire something else when that happens. Message: Sys.WebForms