asp.net-ajax

How to Load Partial Views with Jquery UI Tab by passing parameters?

佐手、 提交于 2019-12-07 12:25:44
问题 I have a parent page ( DistributionReview.aspx ) that has a Deposit Date to select using DatePicker. Just below I have two tabs (* DistributionByType * and DistibutionByStatus ) that I want to load PartialViews. Here the parameter to the PartialView is DepositDate . And I have a custom ViewModel called DistributionReviewModel that the parent page is implementing. I am coming across articles that are directly loading static partial views(Ex: http://www.kevgriffin.com/blog/index.php/2010/02/23

AjaxControlToolkit fails to run on Mono [closed]

笑着哭i 提交于 2019-12-07 11:36:11
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . 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

How do I use a jQuery $(document).ready and an ASP.NET UpdatePanel together?

帅比萌擦擦* 提交于 2019-12-07 09:05:29
问题 I'm rocking this bit of Javascipt in the <head> section of my page: <script type="text/javascript"> $(document).ready(function() { $('dl.expander dd').expander ( { slicePoint: 50, widow: 2, expandEffect: 'show', userCollapseText: '[^]' } ); }); </script> This works great the first time the page is loaded; however, when I click an <asp:button> that is inside an <asp:updatepanel> the page is partially refreshed, but the $(document).ready is never called again. This is important, because this

getElementById() fails to get element when display:none

ε祈祈猫儿з 提交于 2019-12-07 08:47:32
问题 We have several cases of $get('foo') or document.getElementById('foo') failing when the element being looked for has style="display:none;" . This seems to work in some browsers but not others; specifically the case shown below works fine in IE9 with compatibility mode but fails when compatibility mode is turned off. Can anyone explain why this might happen, and how we can work around it? An example follows. Our ASPX page contains <span id="JobAddressCheckBoxWrapper" style="display: none;">

AjaxFileUpload postback false

蓝咒 提交于 2019-12-07 08:27:14
问题 i am using AjaxFileUpload in ASP.NET 4.0 website. The problem is that when i upload a file its UploadComplete fires which causes a postback to page. on every postback caused by AjaxFileUpload the Ispostback property is False which should be True . What is the reason. I checked it in the updatePanel and without it. It has no affect at it. Here is the <ajax:AjaxFileUpload ID="AjaxFileUpload1" ContextKeys="fred" AllowedFileTypes="jpg,jpeg,png,gif" MaximumNumberOfFiles="3" runat="server"

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

非 Y 不嫁゛ 提交于 2019-12-07 06:42:47
问题 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? 回答1: This issue sometimes occurs when you have a control registered as an AsyncPostbackTrigger in multiple update panels. If that's not the problem

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

我的梦境 提交于 2019-12-07 04:54:53
问题 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

Can't Deserialize a Nullable KeyValuePair from JSON with ASP.NET AJAX

偶尔善良 提交于 2019-12-07 04:02:56
问题 The following class does not deserialize (but does serialize) using System.Web.Script.Serialization.JavaScriptSerializer . public class foo { public KeyValuePair<string, string>? bar {get;set;} } The attempt to deserialize results in a System.NullReferenceException when System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject reaches the bar property. (Note, that is a surmise based on the stack trace.) Changing the property type to KeyValuePair<string,string> fixes the

Is the ASP.NET Ajax Library dead?

ε祈祈猫儿з 提交于 2019-12-07 00:13:19
问题 I've recently stumbled across a few blogs that say the ASP.NET Ajax Library is dead, in particular: http://encosia.com/2010/10/04/understanding-jquerys-impact-on-microsoft-and-asp-net/ http://weblogs.asp.net/toddanglin/archive/2010/04/19/microsoft-ajax-client-library-is-dead-long-live-jquery.aspx Is this generally true, technically and practically? 回答1: Yes, it is. Even for SharePoint developers (which uses ASP.net AJAX heavily) it's out of favor. However, the SERVER SIDE ASP.net AJAX

AsyncFileUpload Inside Listview Insert, Edit Itemtemplate and EmptyData Template won't work

让人想犯罪 __ 提交于 2019-12-06 23:14:42
问题 AsyncFileUpload is not working inside Listview Insert, Edit Itemtemplate and EmptyData Template. Above is my Client Side Functions function AttachmentUploadSuccessful() { debugger; var textError = $(".AttachmentError").text(); if (textError.length > 0) { var text = $(".AttachmentError"); text.innerText = text.textContent = textError; sender._onError(textError); // it will raise the OnClientUploadError event return; } else { //alert(" File attachment is uploaded successfully."); //CODE TO