Questions tagged [asp.net-ajax]

ASP.NET AJAX, originally known as "Atlas," represents an enhancement to ASP.NET crafted by Microsoft to deliver dynamic and engaging web content. This suite of technologies empowers users to send asynchronous requests from their browsers to the server, enabling specific sections of the webpage to be updated without requiring a full page reload.

Adding new controls dynamically in an ASP.NET UpdatePanel with AJAX may require line breaks to be properly displayed

I seem to be struggling with a basic concept here and I'm not sure how to proceed. Below is the code from my Default.aspx file: <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ScriptManager ID="MainScrip ...

Parsing a JSON object using JSON.NET

Hi there, I am encountering an issue that I can't seem to solve. I need help extracting values from the JSON Object in a web method. ASPX Code $(document).ready(function () { // Add the page method call as an onclick handler for the div. ...

Shooting Star, Dynamic Data Update, Bi-Directional Data Transfer

Does anyone have a sample of a Comet app in .NET that demonstrates how to persist the client's connection on the server? ...

What causes the entire page to refresh when using ValidatorCallOut in the Ajax Control Toolkit?

After downloading the Ajax Control Toolkit, I am trying to integrate its components into my project. I have utilized the ValidatorCallOut Component as an extender for a Textbox, so that when the user switches focus to another Textbox, the ValidatorCallOu ...

Why is the Ajax call not selecting the image in the ASP.NET form?

I've been working on a project using asp.net core and I encountered an issue with sending an ajax request to the controller. Specifically, my ajax function is causing me some trouble when it comes to uploading images/files. Currently, whenever a user ...

Most effective method for performing partial updates to content in ASP.NET

My initial plan was to utilize a master page for every page within my application. However, I soon discovered that every time the page changed, it would reload the full page even if it had the same master page. I realized I had confused the frameset with t ...

Fetch additional information via Ajax request when button is clicked within MVC 4

I am building a feature to display 6 records in an HTML table with a button labeled Load More. The goal is for each click of the button to retrieve another set of 6 records. Here's what I have tried so far: Within the Controller [HttpGet] private JsonRes ...

Can we avoid the error callback of an AJAX request from being triggered once we have aborted the request?

Initially, I encountered a challenge where I needed to find a way to halt an AJAX request automatically if the user decided to navigate away from the page during the request. After some research, I came across this helpful solution on Stack Overflow which ...

retrieve content within an iframe via ajax

I currently have an iframe set up on the server side like this: <iframe frameborder="0" runat="server" style="width: 100%; height: 700px; background-color: #bacad3;" id="I1" name="I1" src="Page.aspx"></iframe> and I update the content dynamic ...

AJAX checkmark and X control

Looking to create a sleek tick and cross control for ASP.NET that functions like radio buttons or checkboxes but is more visually appealing. The idea is to have a faded tick and cross displayed next to each other, with the ability for one to become highlig ...

Troubleshooting ASP.NET Ajax and Validator Issues

My web form contains several elements like a TextBox, SaveButton, RequiredFieldValidator, DataGrid, and a paging button all housed within a single UpdatePanel. The SaveButton is responsible for saving the value in the TextBox to the database and updating t ...

Any ideas on how to resolve this ajaxToolkit issue?

Just for your reference, here's what I'm trying to achieve: https://i.stack.imgur.com/GYaNz.jpg Error 1: Unknown server tag 'ajaxToolkit:CalendarExtender'. <ajaxToolkit:CalendarExtender FirstDayOfWeek="Monday" PopupPosition="BottomLeft" ...

Is AJAX the key to securing Paypal Payflow Transparent Redirect with SecureToken?

Currently, I am developing a C# MVC application within the VS2012 Framework 4.5 to ensure PCI compliance using Payflow Pro from PayPal (https://pilot-payflowpro.paypal.com). We have been utilizing PayflowPro for an extended period, and this is the tool we ...

Tips for verifying a login modal on an asp.net webforms using jQuery?

I am currently working on an asp.net webpage that utilizes a modal bootstrap for user login. Upon clicking the Login button, it should authenticate the user and initiate a server-side method called "ExportToZip" to download a zip file. My issue lies in ens ...

What is the best way to automatically refresh a page every minute using ajax?

Is there a way to automatically update a specific div on my page with the minute of the match every 15 seconds? I want to refresh only that particular area where the div is located. <script> setInterval(function () { ...

Retrieving Singular Data from Database Using Asp.net MVC Ajax

I am facing an issue with this Ajax.ActionLink button: @Ajax.ActionLink(" ", "BtnNext", null, new AjaxOptions { HttpMethod = "GET", InsertionMode = InsertionMode.Replace, ...

Using $.ajax to make asynchronous requests in ASP.NET Web Forms

I am currently working on incorporating the $.ajax method into my sample program. The structure of the page is as follows: <form id="form1" runat="server"> <div> Country: <asp:TextBox ID="txtCountry" runat="s ...

There seems to be an issue with the function code error when calling it within the

When I attempt to run my code in this way, I encounter a compile time error stating that the expression statement is not an assignment or call... (within the else statement). What am I missing here to get it to work? I've made numerous attempts to ad ...

Is it possible for Response.Redirect and OnBeforeUnload to cooperate effectively?

Is there a way to detect if the server-side code has sent a Response.Redirect in an OnBeforeUnload event? I need to alert the user before they navigate away from a page, but I don't want the prompt to appear when the server redirects. I'm dealing with old ...

Controller receiving empty object array from FormData

I am encountering an issue with my ajax call to the controller, where I am passing FormData() containing an array of objects and other properties. The list array that I pass seems to have 0 elements in the controller. Can anyone assist me with this problem ...

Enhance your table with Ajax: Updating and appending data effortlessly

I am working with an HTML table structured as follows: <table> <tr id="headers"> <td>Name</td> <td>Last Communicated</td> <td>Status</td> </tr> <tr id="data"> ...

The HTMLEditor from ASP.NET AJAX Control Toolkit is not appearing correctly on the page

My experience with the ASP.NET AJAX Control Toolkit HTMLEditor has been less than satisfactory. The toolbar layout is not being displayed correctly, with what should be a 3-line toolbar appearing stretched out to 9 lines. ...

The dropdownlists mysteriously vanish forever after a modal popup, likely due to a timer issue

We are encountering some unexpected behavior with dropdown lists on a relatively complex webpage when using IE6. The layout of the page consists of 2 update panels, each containing a GridView that displays data in a master-details format. Additionally, eac ...

"Error alert: The specified property 'Iscontains' cannot be read because it is undefined" appears in the script for this video

I am currently utilizing AJAX to interact with my backend code. I retrieve URLs from the database and then render them onto the DOM, displaying videos accordingly. However, I am encountering an issue where Uncaught TypeError: Cannot read property 'Iscon ...

For Firefox, the status code always comes back as 0 when using xmlhttprequest

When attempting to make asynchronous calls using the xmlhttprequest object, everything functions perfectly in Internet Explorer. However, Firefox seems to be encountering issues. Here is a snippet of the problematic code: if (req.readyState == 4) { i ...

Accessing Excel files through Ajax and MemoryStream successfully downloads new Excel files; however, this method may not work for existing Excel files already stored

Currently, I am working on a .Net 6 Razor pages application where I have successfully implemented the functionality to download an Excel file on a button click via Ajax. The approach involves creating a new Excel workbook in memory stream using OpenXML. C ...

Troubleshooting the ineffectiveness of the Ajax POST method in ASP.NET Core

I am working on an ASP.NET Core application that has a controller named GalleryController. The controller code is as follows: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft ...

The onClick event is not executing my function

Having trouble triggering the onclick() event when trying to modify table data using ajax. Here's the code snippet: (the onclick() event is located in the last div tag) @{ ViewBag.Title = "Edit_Room"; Layout = "~/Views/Shared/_LayoutAdmin.cshtml"; ...

"Have you ever wondered about the magic that unfolds when we utilize AJAX

I'm confused about the concept of AJAX. When we use AJAX, why doesn't the page get refreshed every time? Is this related to the page_load method or something else? ...

Ways to limit access to the jQuery AJAX method from the browser console window

Looking for ways to prevent unauthorized access through the browser console to manipulate the jQuery ajax method. The issue at hand is that anyone can easily access the console and execute a script to repeatedly make requests, causing potential security r ...

Get JSON or partial HTML responses from ASP.NET MVC controller actions

Is there a recommended method for creating controller actions that can return either JSON or partial HTML based on a specified parameter? I'm looking for the optimal way to asynchronously retrieve the results in an MVC page. ...

Every time I attempt to send Ajax jQuery parameters in a POST request with MVC 5, I am met with receiving NULL values

When attempting to send the subscriberemail parameter to the action result in the controller using AJAX jQuery parameters, I am consistently receiving a null value. Here is the code snippet: $("#button-subscribe-newsletter").click(function () { debug ...

How can one access a client instance that has been generated using the $create method in ASP.NET AJAX?

I've utilized the client-side ASP.NET AJAX library to create a client component instance using the $create shortcut method. The object is linked to a DOM element, but I'm struggling to find a way to reference the instance since it's not registered on the w ...

Validating Code Retrieved from Database Using Ajax Requests

I can't figure out why my code isn't working as expected. I'm attempting to validate a code by calling a function in the controller. If the code already exists, I want to display a 'failed' message and prevent the form from being submitted. However, this f ...

Error Message: An error occurred due to an unset object reference when utilizing the Update

Encountered the error message "Object reference not set..." while debugging my code. Upon investigation, I discovered that the issue lies within the UpdatePanel. Removing it resolved the problem, but unfortunately, it's necessary to prevent page reloa ...

refreshing treeview without reloading the page

In my implementation, I've included an UpdatePanel that contains a TabContainer, which in turn houses a Panel. Within this panel, there is a TreeView that I must maintain the order of. Now, going back to the contents of the UpdatePanel, there's a ...

Sending dynamic boolean model property via AJAX dynamically

I am facing an issue while passing a property from my model to an AJAX form. The boolean value is resolving as "true/false" and causing problems in the process. $.ajax({ url: '/Projects/SearchTable2', type: "GET", data: { sub ...

Retrieve the chosen date from the Ajax calendar extender control

Using the Ajax Calendar extender control in my asp.net 3.5 application has been quite helpful. I am wondering how I can retrieve the selected date from the Ajax calendar extender control in the code behind file. For instance, if I select 01/01/2011 from ...

Tips for successfully retrieving a boolean value from an ASP.Net JavaScript AJAX request using a C# method

Query: Is there a way to call a C# function from JavaScript code on an .aspx webpage to get authentication results based on a username and password? Here is the JavaScript AJAX POST request I am currently using: $.ajax({ type: "POST", ...

Leverage asp.net AJAX capabilities using JavaScript

I have a question that may seem basic. I am using ASP.NET ajax toolkit and jQuery. Is it possible for me to call a server-side method/function from JavaScript in order to update a control? Client-side send_request(foobar, args); Server-side private voi ...

Implementing delayed loading of ASP.NET MVC View content with Ajax for improved performance

Just a quick inquiry :) I am working on an ASP.NET MVC view. My goal is to have the view load and then automatically trigger a post request using ajax to load some additional content without requiring any user action. I'm familiar with the Ajax.ActionLink ...

Is there a specific asp.net ajax script reference that is compulsory to include?

In my asp.net web application, I utilize ModalPopupExtender and Accordion controls on various pages. After using firebug to profile the scripts, I have noticed a high number of ScriptRefrence.axd files being loaded. I am now wondering which of these scri ...

What are the various categories for the ASP.NET AJAX accordion menu?

I have encountered an issue with my SQL tables, specifically Categories and Posts. When I try to select the top 5 records for each category and display them in an accordion menu, it shows the category names for each post repeatedly. Below is a snippet of ...

Sending data with a post request using Ajax in ASP.NET MVC 3

Hey everyone, I'm working on an ajax login call. I'm serializing the form data and sending it to the server to get a redirect URL link. However, I'm running into an issue where my URL after the post ends up looking like http://localhost:508 ...

Is there a conflict when both Html.BeginForm and an ajax call are used to call the

While attempting to incorporate Ajax to send additional data to my action controller, I encountered an issue where the model parameter became null while the Ajax parameter retained its value. This occurred despite using Html.beginform('index', 'payable') a ...

Performing a Jquery Ajax request when clicking on an anchor (<a>) tag

This is my custom ASPX page where I have implemented a functionality to call a code-behind function using jQuery AJAX when clicking on an 'a href' element. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="ko ...

I could really use some assistance with the concept of "AJAX" - can anyone help

After spending several months working with AJAX, I have come to understand the typical request lifecycle: Sending parameters to a background page (PHP/ASP/HTML/TXT/XML ... what other options are available?) Performing server-side processing Receiv ...