asp.net-ajax

Which Javascript history back implementation is the best?

主宰稳场 提交于 2019-11-29 03:05:46
问题 There are implementations for history.back in Micrososft AJAX and jQuery (http://www.asual.com/jquery/address/). I already have jQuery and asp.net ajax included in my project but I am not sure which implementation of history.back is better. Better for me is: Already used by some large projects Wide browser support Easy to implement Little footprint Does anybody know which one is better? EDIT: Another jquery plugin is http://plugins.jquery.com/project/history It is recommmended in the book

asp.net mvc 3 - ajax form submit and validation

允我心安 提交于 2019-11-29 00:12:43
问题 I am sorry if this has been asked already, but I have been looking for sometime but all I have found are rather old posts (mvc1, mvc2). I have a form which I would like to submit via Ajax. This looks like it would work but does not cover server side validation. 1) I am unsure if I should use the AjaxHelper.BeginForm or use raw jquery calls ($.ajax) ? What is the recommended approach here? 2) How do I handle client and server side validation? I am hoping the mvc framework provides a built in

Html.RenderPartial and Ajax.BeginForm -> Submit is called twice

江枫思渺然 提交于 2019-11-28 22:56:50
问题 I have the following index view: @model BoringStore.ViewModels.ProductIndexViewModel @{ ViewBag.Title = "Index"; } <h2>Produkte</h2> <div id='addProduct'> @{ Html.RenderPartial("Create", new BoringStore.Models.Product()); } </div> <div id='productList'> @{ Html.RenderPartial("ProductListControl", Model.Products); } </div> The "productList" is just a list of all products. The addProduct renders my Create View: <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text

ASP.NET MVC “Ajax.BeginForm” executes OnSuccess even though model is not valid

◇◆丶佛笑我妖孽 提交于 2019-11-28 21:22:17
I have a "submit feedback" form which uses "Ajax.BeginForm" to render a partial containing the form elements. The OnSuccess event is triggering even if the ModelState is not valid. Is this normal? I was expecting to be able to do a few postbacks resulting in an invalid model, then when the model is valid and there are no errors then the OnSuccess event would trigger? I handle this issue with a fairly simple javascript technique: First setup your OnSuccess like this: OnSuccess = "UpdateSuccessful(data)" Then your javascript function like this: function UpdateSuccessful(data) { if (data.indexOf(

Calling a WebMethod using jQueryAjax “GET”

与世无争的帅哥 提交于 2019-11-28 20:32:17
i have a ajax request which works well using "POST" but when used "GET" it gives me the following error, {"Message":"An attempt was made to call the method \u0027GetSomething\u0027 using a GET request, which is not allowed.","StackTrace":" at System.Web.Script.Services.RestHandler.GetRawParams(WebServiceMethodData methodData, HttpContext context)\r\n at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"} so here is my code, on the client side, function test() { $.ajax({ url:

Sys.WebForms.PageRequestManagerServerErrorException 12031

一个人想着一个人 提交于 2019-11-28 19:26:18
I'm occasionaly getting the following popup from an AJAX.NET application Sys.WebForms.PageRequestManagerServerErrorException: An Unknown error occurred while processing the request on the server. The status code returned from the server was: 12031 From the Microsoft kb that status code indicates a ERROR_INTERNET_CONNECTION_RESET, but it doesn't state what was the underlying issue the triggered the error in the first place. How can I log/trace/etc the underlying error that generated the popup? It's a viewstate problem, but not related with time but with size. Try playing with maxRequestLength

ModalPopupExtender OK Button click event not firing?

╄→гoц情女王★ 提交于 2019-11-28 19:06:35
I have a Button inside an UpdatePanel. The button is being used as the OK button for a ModalPopupExtender. For some reason, the button click event is not firing. Any ideas? Am I missing something? <asp:updatepanel id="UpdatePanel1" runat="server"> <ContentTemplate> <cc1:ModalPopupExtender ID="ModalDialog" runat="server" TargetControlID="OpenDialogLinkButton" PopupControlID="ModalDialogPanel" OkControlID="ModalOKButton" BackgroundCssClass="ModalBackground"> </cc1:ModalPopupExtender> <asp:Panel ID="ModalDialogPanel" CssClass="ModalPopup" runat="server"> ... <asp:Button ID="ModalOKButton" runat=

Stackoverflow Style Notifications in asp.net Ajax

匆匆过客 提交于 2019-11-28 18:57:06
When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on. I know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style of notification system in asp.net AJAX. On a side note, what's the "official" name for this style of notification bar? I like it to. div tag with a fade. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Walkthrough/UsingAnimations.aspx In this post ( http://www.pieterg.com/post/2010/05/24/ASPNET-and-Stackoverflow-Type

Programmatically Adding User Controls Inside An UpdatePanel

二次信任 提交于 2019-11-28 18:26:11
I'm having trouble dynamically adding controls inside an update panel with partial postbacks. I've read many articles on dynamic controls and I understand how to add and maintain them with postbacks but most of that information doesn't apply and won't work for partial postbacks. I can't find any useful information about adding and maintaining them with UpdatePanels. I'd like to do this without creating a web service if it's possible. Does anyone have any ideas or references to some helpful information? This is, I think, one of the common pitfalls for asp.net programmers but isn't actually that

One Update Panel vs. Multiple Update Panels [closed]

…衆ロ難τιáo~ 提交于 2019-11-28 17:45:20
I have an ASP.NET web page that displays a variety of fields that need to be updated best on certain conditions, button clicks and so on. We've implemented AJAX, using the ASP.NET Update Panel to avoid visible postbacks. Originally there was only one area that needed this ability ... that soon expanded to other fields. Now my web page has multiple UpdatePanels. I am wondering if it would be best to just wrap the entire form in a single UpdatePanel, or keep the individual UpdatePanels. What are the best practices for using the ASP.NET UpdatePanel? Multiple panels are much better. One of the