asp.net-ajax

AjaxControlToolkit fails to run on Mono [closed]

元气小坏坏 提交于 2019-12-05 14:54:36
Running ASP.NET 3.5 on Mono 2.6.7 (Debian), AjaxControlToolkit throws the following exception on startup: "Cannot cast from source type to destination type." (see stack trace below) This is a simple website referencing AjaxControlToolkit (so long as it's referenced, it will fail throwing this exception). On .NET 3.5, the same simple webpage referencing AjaxControlToolkit.dll would run fine. How would you get this to run on Mono? <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register assembly="AjaxControlToolkit" namespace=

Update Progress animated gif stops on postback

吃可爱长大的小学妹 提交于 2019-12-05 14:38:41
I have used ajax update progress control that shows the animated gif when postback happens. Problem: It displays for a while but then it stops refershing (or rather, stops playing/revoloving). What could be the actual cause of the same? Please advice!. Thanks! Jourdan The animation of a .gif will stop on PostBack with Internet Explorer. The problem is inherent to Internet Explorer. Apparently this issue goes all the way back to IE 6 (though I've only confirmed it in IE8). There is a little hack around it, and that's by updating it's source with a setTimeout function UpdateImg(ctrl) { var img =

How do I disable or remove unnecessary form elements before an ASP.NET asynchronous postback?

拈花ヽ惹草 提交于 2019-12-05 14:05:48
I'm building a shopping cart page that could potentially contain dozens of separate items. Each item has a collapsible panel that contains several form elements that can be used to customize it. Most of the cart is wrapped in an UpdatePanel so that I can avoid a full postback when the user makes changes. When there are many items in the cart, there are of course many many postback elements, all of which are included in the raw form post, even though each post is really only triggered by the change of a single element (ChildrenAsTriggers=True). I find that the uncompressed size of the redundant

cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher

杀马特。学长 韩版系。学妹 提交于 2019-12-05 13:08:26
I am using ajax enabled WCF, when i open the url in web browser i am getting this error. The message with Action ' http://localhost:22219/MobileService.svc/GetProductCategories ' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None). MobileService

Multiple Async postbacks at the same time - ASP.NET

≡放荡痞女 提交于 2019-12-05 11:37:15
Say I have 2 UpdatePanels on the page and each UpdatePanel has a one server Button each. When I click on the first button and then the second button and look in Firebug, I see that the 2nd async postback is not triggered until the first one completes. Is this working as expected? My understanding was with AJAX postbacks, the event handlers for the buttons trigger simultaneously. EDIT: Any help anyone? It is accurate for that model. You probably want pagemethods. EDIT: drachenstern says "finally back at my computer" Here's the thing: An UpdatePanel is fundamentally a page-postback. It can only

Getting Exception Details from ASP.NET PageMethods on the Client SIde

穿精又带淫゛_ 提交于 2019-12-05 11:06:41
I am having a pagemethod to which i give a call from my JavaScript say Pagemethods.MyMethod(MyParameter, onsucess, onfailure); In the Code behind, I have something like this: [WebMethod] public static void MyMethod(Param) { try{ //DoSomething.. } catch(exception ex) { //Log the exception and rethrow throw new exception(ex.innerexception); } } Now the issue i face is : Whenever i do get an exception, i re throw the exception from code behind But in the onfailure method, i just get a generic message saying that "the server method MyMethod failed with following error: " I don't seem to get the

“Sys.WebForms.PageRequestManagerServerErrorException: status code: 500”

余生颓废 提交于 2019-12-05 10:37:43
I am using an asp.net text box inside ajax update panel. If I enter &# in the textbox and press Save Button , it gives a javascript error Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 Please help me why this error appears? This issue sometimes occurs when you have a control registered as an AsyncPostbackTrigger in multiple update panels. If that's not the problem, try adding the following right after the script manager declaration: <script type="text/javascript"

How to change returned ContentType in ASP.NET MVC controller (ActionResult)

£可爱£侵袭症+ 提交于 2019-12-05 09:47:30
问题 I have ASP.NET MVC controller named dictionary with method ControlsLangJsFile. Method returns view of users control (ASCX) which contain JavaScript variables. When i call the method it returns variables with parsed strings, but Content Type is html/text. It should be: application/x-javascript public ActionResult ControlsLangJsFile() { return View("~/Views/Dictionary/ControlsLangJsFile.ascx",); } How do i achieve this? 回答1: Users control doesn't accept ContentType="text/xml" Solution: public

Detect if Asp.Net form is valid with javascript/jquery

℡╲_俬逩灬. 提交于 2019-12-05 09:23:11
I have a form which is in an updatePanel and I have a span with hidden loading image, which I want to show when user clicks to submit button but I first need to check if page is valid on client side. Also I'm making loading span visible with jQuery. Here is my code: <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> function showLoading() { $('#loader').show(); } </script> </head> <body> <asp:ScriptManager ID="smMain" runat="server"></asp:ScriptManager> <asp:UpdatePanel ID="upForm" runat=

Passing data into a ModalPopupExtender

假装没事ソ 提交于 2019-12-05 05:28:57
问题 I have a ModalPopupExtender that allows a customer to apply payment info. It has been working great. Then the customer asked to see the total due on the ModalPopup. This did not seem like a big deal to just take the total due from the parent control and pass it into the ModalPopup control. It seems like there is no easy way do to this. Here is my HTML code, keep in mind this code is wrapped in a UpdatePanel <asp:LinkButton ID="lnkMakePayment" runat="server" Visible="true" OnClick=