asp.net-ajax

ScriptManager.RegisterClientScriptInclude does not work in UpdatePanel

邮差的信 提交于 2019-12-05 05:24:01
I've read through the net but haven't found a solution to the following problem. I have this example page (_ScriptManager.aspx) with a ScriptManager , an UpdatePanel , a MultiView with two Views and two LinkButtons two switch between the views. The second view contains some functionality which I want to load a JavaScript file for (_ScriptManager.js). Since I don't know whether the user will ever visit view 2 I don't want to include the javascript file statically on for every request. I only want to load it if and when I need it. So I need to include the script file during an asynchronous

How can I send int array from ajax to c# mvc?

谁说胖子不能爱 提交于 2019-12-04 23:52:44
How can I send int array from $.ajax to c# mvc? Daniel $.ajax({ url: <Url of the action>, type: "POST", data: JSON.stringify([1,2,3]), dataType: "json", contentType: 'application/json; charset=utf-8' }); and in the action. public ActionResult ReceiveIntArray(int[] ints) { ... } mvc should parse the json automatically. check out this question. VMAtm Try solution from this question : Set the traditional property to true before making the get call. i.e.: jQuery.ajaxSettings.traditional = true $.get('/controller/MyAction', { vals: arrayOfValues }, function (data) { ... } The way I'm doing it is

Viewstate Optimisations

老子叫甜甜 提交于 2019-12-04 22:13:00
Hy, I'm interested in some general optimisation methods in an asp.net ajax project for Viewstate (ex. to reduce the size of viewstate , or just speeding up the viewstate somehow, or others this should be a general discussion :-) ). So what kind of optimisation do you use for ViewState? What possibilities are offered on Asp.net or Ajax framework? @silky is right, disable it where ever you can. We try to keep it disabled on as many controls as possible. Also, once you're using as little as possible, it might be worth looking at putting something like this in you pages (or better a base page

Reasons why ASP.NET AJAX would be disabled

痞子三分冷 提交于 2019-12-04 21:14:09
问题 I have an ASP.NET application that uses ASP.NET AJAX and the AJAX Control Toolkit. The application runs fine on all recent browsers on a PC. It also works fine on my iPad, at least the first time the application is accessed. I have found that if I shut down the iPad and return to the page later (via a bookmark or similar), the site is broken. I have narrowed down the failure to an ASP.NET/ASP.NET AJAX issue/bug/limitation, and I'm looking for some help to progress. Using Fiddler as a proxy

Asp.Net Ajax WebService and Internal Error 500

只愿长相守 提交于 2019-12-04 19:13:12
I can call the webservie directly to the browser with the following URL and it returns be all what I want : http://localhost:64438/MySearchAutoComplete.asmx/GetCompletionList When I add it to an autocompleteexetender into the Default.aspx page like that : <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" TargetControlID="TextBox1" runat="server" ServiceMethod="GetCompletionList" ServicePath="http://localhost:64438/MySearchAutoComplete.asmx" CompletionSetCount="12" MinimumPrefixLength="1" /> The page load, I have a textbox but I have an error 500 every time I add a keystroke in the textbox.

Animated gif freezes in UpdateProgress in IE8

我们两清 提交于 2019-12-04 19:09:04
I am using update progess to show the animated gif saying "Loading..". I am testing in IE 8 and the animation freezes. I have come to know that IE 6 & 8 have a bug to handle this and have found certain supportive links such as here and here as well , but i'm not sure how to apply in update progress to resolve my issue? Please help! Thanks! When this happened to me, the browser's processor was actually pegging out due to KB 2000262 , there is a fix, if this is your problem: UpdatePanel Async Postsback slow in IE…Part 3 来源: https://stackoverflow.com/questions/7204378/animated-gif-freezes-in

How do I code my ASP.NET page to parallelize downloads across hostnames?

淺唱寂寞╮ 提交于 2019-12-04 18:12:33
Google Page Speed test tells me I need to distribute my queries across DNS Domain names to speed up rendering. Since I do development offline, I'd like to find a solution that will distribute my static content (img, CSS, js) across different hostnames, and will still work when I'm offline in an airplane. Q: How can I code my page to use relative paths (or local host) when offline, and to consistently send static content requests among 5 hosts? After reading this I'd like the url to be similar to this: When Online: Dynamic content www.TLSAdmin.com When Online: Static content static1.TLSAdmin

Why is my CalendarExtender getting overlapped when rendered?

放肆的年华 提交于 2019-12-04 17:45:41
问题 I'm working on a .NET web application and I'm using a CalendarExtender control within it to have the user specify a date. For some reason, when I click the icon to display the calendar, the background seems to be transparent. I'm using the extender on other pages and do not run into this issue. I'm not sure if it is worth mentioning, but the calendar is nested within a panel that has a rounded corner extender attached to it, as well as the panel below it (where the "From" is overlapping).

Asychnronous Message Send Asp.net

故事扮演 提交于 2019-12-04 16:51:29
I'm trying to learn about how AJAX stuff works under the hood. Say I have an asp.net form with a button on it. I then have a database with a single column DateTime . When I click the button on the asp.net form I want to insert a column in the database with the current time. I'll have a C# event handler: protected void btnButton_OnClick(Eventargs e, object sender) { //insert DateTime.now into DB //This part is easy } What I would like to happen on the form itself is to have the button click NOT reload the form. It would just send a message to the server; there is no reason for the page to

ASP.Net MVC 3.0 Ajax.ActionLink Onbegin Function true the execute the action?

喜夏-厌秋 提交于 2019-12-04 16:50:43
I have a Ajax Action link, which will call a action Method, In my Ajax Option i have called a Validate function, If this function returns true, then only i would want this Action Execute, not sure how i can get this done? My Ajax ActionLink Ajax.ActionLink("Renew", "Edit", "Controller", new { id = "<#= ID #>" }, new AjaxOptions { OnBegin = "isValidDate", OnSuccess = "DestroyRecreateAccordion", UpdateTargetId = "accordion", InsertionMode = InsertionMode.InsertAfter, }, new { @class = "standard button" }) How can I do this only if isValidDate returns true? HaBo AjaxOptions on Action Link OnBegin