asp.net-ajax

Jquery's Ajax Property For Asp.Net 2.0

試著忘記壹切 提交于 2019-12-23 04:51:27
问题 I always see the code like this in the blogs: $.ajax({ type: "POST", contentType: "application/json; charset=utf-8", url: "WebService.asmx/HelloWorld", data: "{}", dataType: "json", success: function(msg) { alert(msg.d); } }); But I think this is run only with asp.net 3.5. I couldn't run it with 2.0. How can I use such these codes in my Applications? 回答1: You need to add this attribute to your webserver class [System.Web.Script.Services.ScriptService] public class Service : System.Web

Ajax.BeginForm is not working as expected

半腔热情 提交于 2019-12-23 04:29:26
问题 I have a very strange problem with Aajx.BeginForm. I have this code : In view : @using (Ajax.BeginForm("Upload", "Profile", new AjaxOptions() { HttpMethod = "POST" }, new { enctype = "multipart/form-data" })) { @Html.AntiForgeryToken() <input type="file" name="files"><br> <input type="submit" value="Upload File to Server"> } In controller : [HttpPost] [ValidateAntiForgeryToken] public void Upload(IEnumerable<HttpPostedFileBase> files) { if (files != null) { foreach (var file in files) { //

ASP.NET MVC & Ajax Control Toolkit

纵然是瞬间 提交于 2019-12-23 04:03:39
问题 One of the things I like about coding "old skool" (web forms) is the AJAX Control Toolkit. I saw on the Microsoft Storefront video 14, Rob Conery uses the TextboxWatermark control. When I downloaded the code though, I couldn't find any reference to the Watermark control or any other control from the toolkit nor could I get it to work. So my question is, does the AJAX Control Toolkit even work in an MVC / AJAX / JQuery type world without viewstate. What do you use for "simple" controls such as

JavaScript “Access is Denied” error - no iframes

霸气de小男生 提交于 2019-12-23 04:01:52
问题 We are seeing an intermittent JavaScript “Access is Denied” error in a customer application in IE8. The error occurs occasionally for some users and never for other users. I am able to reliably reproduce the error on my browser by jumping through a few hoops: Go to the page in question (note the Internet zone, even though the web server is a test server running on our subnet) Open Internet Security Properties (message displayed that “some settings are managed by your system administrator”)

Drag n Drop Inside 2 Listbox in Asp.Net

别说谁变了你拦得住时间么 提交于 2019-12-23 03:15:39
问题 I want to implement Drag n Drop Functionality in 2 List/Combo Box in Asp.Net.I will select and drag 1 item from listbox1 and drop it on Listbox2. So How should i start with ? Is there any Jquery Plugin Available ? Thank Rick Jackson 回答1: I'm using this two great plugins for drag and drop. They have a lot of ready to use samples: http://threedubmedia.com/code/event/drag http://threedubmedia.com/code/event/drop 回答2: There are a lot of plugins available on net,but you can achieved the by using

How can I find out what script is setting my element's visibility to hidden?

天大地大妈咪最大 提交于 2019-12-23 02:56:33
问题 I'm dealing with a complex page with a lot of different scripts going on, some ASP.NET AJAX and some jQuery. For some reason when the page loads one of the elements has its visibility set to hidden. Is there anything out there that can tell me what it is that's causing this element to be invisible? Or even something that would stop everything that's happening in whatever script is doing this so I can see what it is? 回答1: Use a DOM inspector (like the one built in to Chrome) to first determine

Error “Telerik is undefined”

孤人 提交于 2019-12-23 01:25:51
问题 I am getting JScript error as "Microsoft JScript runtime error: 'Telerik' is undefined" while running my project. I have just tried configuring the project from the menu bar 'Telerik->Rad controls for asp.net ajax->configure project' and it gives me this error. Please find below my webconfig file. I could find some threads in Telerik forum about trouble shooting for the same but they didn't solve my issue. I am using .net 4.0 version. <?xml version="1.0"?> <configuration> <connectionStrings>

Make postback when the OkButton in a ModalPopup is clicked in ASP.NET AJAX

余生长醉 提交于 2019-12-22 12:18:10
问题 I follow the example in Atlas: Creating a Confirmation Using the ModalPopup Extender to make a postback when the OkButton in a ModalPopup is clicked (it uses the ModalPopupExtender that comes in ASP.NET Ajax Control Toolkit), but as I can see, the Sys.WebForms.PostBackAction() is no longer present in ASP.NET AJAX (the example is for Atlas). When I run it the "Microsoft JScript runtime error: Object expected" error message raises, in the line in javascript where I create the PostBackAction.

asp.net ajax 4.0 client templates, how to bind a select?

有些话、适合烂在心里 提交于 2019-12-22 10:34:30
问题 I am trying to create a simple ajax grid that allows me to add and remove rows and also edit some of the columns and have others columns calculated directly based on the input in the others. I thought this would be a nice oppurtunity to play with asp.net ajax 4.0 and the client templates. It works pretty ok but I can't seem to find a way to bind my json data to a . How can I do this? A normal template looks like this <div id="authorsTemplate" style="visibility:hidden;display:none;"> <ul> <li

AJAX .post async

和自甴很熟 提交于 2019-12-22 10:32:19
问题 What exactly does the following do: $.ajax({ type: "POST", async: false, vs $.ajax({ type: "POST", async: true, Meaning what is the difference in the behavior? 回答1: From the jQuery site: By default, all requests are sent asynchronously (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation. Note that synchronous requests may temporarily lock the browser,