asp.net-ajax

Ideas for how to deal with viewstate when using ASP.NET AJAX and update panels

末鹿安然 提交于 2020-02-04 14:33:09
问题 Here is a class that I wrote to solve some issues that I was having with viewstate. It stores the info in the users session and increments a value to track which state to show. The difficulty is that there is no support for the back button. The reason I originally had this was that before AJAX came along the viewstate was being send down to the client instead of being stored on the server. I figured that by storing it on the server i could make the client experience much richer. Now with

Internet Explorer Caching asp.netmvc ajax results

柔情痞子 提交于 2020-01-28 05:33:25
问题 I'm having an issue with a page in internet explorer. I have an ajax call that calls a form, in other browser, when I click the link it passes in the controller and load correctly data. but in IE, when its loaded once, it aways brings me the same old results without passing in the controller. 回答1: Try: [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")] This attribute, placed in controller class, disables caching. Since I don't need caching in my application, I placed it in my

Sys.WebForms.PageRequestManagerServerErrorException 12031

戏子无情 提交于 2020-01-28 04:08:45
问题 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?

Sys.WebForms.PageRequestManagerServerErrorException 12031

雨燕双飞 提交于 2020-01-28 04:06:05
问题 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?

Ajax passing null value to controller

会有一股神秘感。 提交于 2020-01-26 03:45:08
问题 I have a dropdown that has a list of ID's in it. The customer will select one and it will reflect a price total on the page. Im creating an ajax call that will update the total when a different ID is pulled from the Dropdown. $("#BrandId").on('focus', function () { // Store the current value on focus and on change previous = this.value; }).change(function () { alert("Previous: " +previous); sel = this.value; alert("Selected: " +sel); $.ajax({ cache: false, type: "get", contentType:

Post-back after file download does not work

那年仲夏 提交于 2020-01-25 10:03:49
问题 My page has a pop-up. The button on popup generates and downloads Aspose excel file. (The page also has Ajax settings) Now after file download, my button is disabled and nothing else works on page unless i refresh it manually. Popup on page <div class="modal hide" id="AwaitPracSignoffReportModal"> <div class="modal-header"> <a class="close" data-dismiss="modal">×</a> <h3> <asp:Label runat="server" ID="lblPopupHeading" Text="Awaiting Practice Sign-off Report" /></h3> </div> <!-- Other asp

Dynamically setting (currently static) image array in Javascript

匆匆过客 提交于 2020-01-25 03:33:07
问题 I want to implementa slideshow of images through javascript and js files, where the slideshow contains top4 images. I used the script where the image array has static images. I want to convert it dynamically by finding my images names from index.aspx.cs files which are stored in hidden fields. How do I retrieve these hidden fields and add them to the image array? <script type="text/javascript"> var mygallery2=new fadeSlideShow({ wrapperid: "fadeshow2", //ID of blank DIV on page to house

How to update controls[DataGrid,TextBoxes and Label] based on a row selection made in DataGrid that resideds in a updatePanel?

家住魔仙堡 提交于 2020-01-24 04:51:07
问题 I have got a grid[Grid1] that build its dataRows when a button[search] is clicked, I managed to Ajaxify it by placing it in an UpdatePanel and it worked fine. Before Ajaxifying Grid 1, another grid[Grid2] and some other controls[Text and Labels] used to get populated/updated when a row in Grid 1 was clicked . The Grid2 and other controls used to get populated/updated on the OnItemCommand Event of Grid 1.Its the code in the OnItemCommand that binds the related data to Grid2 and other controls.

How to load data into datatable using ajax in mvc

江枫思渺然 提交于 2020-01-23 12:22:16
问题 I'm loading List of objects from database into datatable using ajax. When debugging, the my MVC action result seem to query the data alright but the datatable column displays null I've tried to serialize the list before returning it in the MVC action but it didn't solve the problem // Code from View <table class="table table-striped" id="codetable"> <thead> <tr> <td>Student Number</td> <td>Student</td> <td>Faculty</td> <td>Department</td> <td>Program</td> <td>Code</td> </tr> </thead> <tbody>

ScriptManager and UpdatePanel not found in namespace System.Web.UI

蹲街弑〆低调 提交于 2020-01-23 05:34:30
问题 I have a MVC4/Web API project and I created a test page that consumes the Web API using Ajax. Testing was going great, so I began working on the UI. One thing I needed to do was to populate some form controls with data returned from the Web API. I used JQuery for this. Now, when I run the application and submit the form, I get an error indicating that the page had been updated: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in