asp.net-ajax

How to use Ajax.BeginForm MVC helper with JSON result?

I'm trying to use the ASP.NET MVC Ajax.BeginForm helper but don't want to use the existing content insertion options when the call completes. Instead, I want to use a custom JavaScript function as the callback. This works, but the result I want should be returned as JSON. Unfortunately, the framework just treats the data as a string. Be...

How to Not Submit a Form Using AJAXToolkit AutoComplete Extender?

Hi I have used AJAXToolkit AutoComplete extender in my project.It works fines.But the issue is with the form of the page. when i type in the AutoComplete, i get list of suggestions.When i click on the page other than the Autocomplete, the form gets submitted. any suggestions how to stop submission of entire form whenever i click on the...

How do I imitate the ASP.NET AjaxOptions delegate functions?

When using the Ajax.BeginForm() helper in ASP.Net MVC, I can pass options with names of different functions, for example one to run OnBegin, one for OnSuccess etc. How do these work "under the hood"? The reason I'm asking is that I'm extending this to provide a jQuery based alternative, and I need to figure out how to get from having th...

Compile errors after converting to a Web Application Project from a Web Site

I'm trying to convert a Web Site to the Web Application project model and I'm running into compile errors that do not seem to be covered by the guidance I found at Converting a Web Site Project to a Web Application Project. The issue is that standard ASP.NET controls that are embedded as child controls within the ContentTemplate of the ...

ASP.NET 2.0: How to make a page remember viewstate without creating history points?

I have a page with a few fields and a runtime-generated image on it. The contents of this page are inside an UpdatePanel. There is a button to take the user to a secondary page, which has a button that calls javascript:history.go(-1) when clicked. The problem is, the first page does a full request instead of a postback or just using the...

Sample ASP.NET application for Javascript refactoring

Good time of day! I want to write article about what can be done with AJAX client script library for local .NET user group and now I'm lookin for some ASP.NET application which could be used as base for Javascript refactoring sample. Good sample should contain bad code :) Inline Javascript is welcome, so are DRY violations. Hope, ide...

How can I get my Autocomplete extender to work?

I've tried to the letter to search for mistakes in my code, but i can't myself get that autocomplete extender to work. Help wanted. Here's my code: (excerpt from my aspx page) <asp:TextBox ID="TextBox1" Width="120px" runat="server"></asp:TextBox> <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlI...

Fetch data from Other Websites

Hi, Even before telling my question, will tell you that this is a very vague question. But please let me know if you have any similar ideas. I am actually trying to write a website of my own locally using ASP.Net. I actually wanted to try and simulate a website with trading and stock details. I wanted to actually fetch the details fro...

ASP.NET Dynamic Page Controls: Is it possible to bind events AFTER Page.Load?

I have a site that I am currently working on in ASP.NET 2.0 using the usual WebForm stuff and ASP.NET AJAX 1.0. Is it possible to bind an event to a dynamically created control after the Page.Load event? I have a table <td> element that I am dynamically creating similarly to this code: ' Create Link Button lnk.ID = String.Format("lnkD...

Check if page is in partial rendering mode ASP.NET 2.0 + AJAX.NET

Hi, I need to determine in the page is loading in a partial rendering mode (when posting back from within an UpdatePanel). Any suggestions? ...

How to pass server-side error messages to ASP.NET Ajax client?

An example scenario: User performs an update, for example a drag & drop. This is an ajax request. Server-side code cannot validate the update or the operation just fails. An exception is thrown. A reasonable error message should be shown to the user. How should I communicate the exception to the client side and show the error message...

What are the Advantages of Using OnAsyncPostBackError over Page_Error

I am currently researching an Exception handling architecture for our App. We will be using UpdatePanels extensively and we will also be calling webservices. I want to know if there is any real need to implement a ScriptManager.OnAsyncPostBackError handler compared to, the Page_Error event which seems to catch all exceptions that are ...

Ajax based Dashboard On LargeData (Asp.net)

hello guys iam working on some sort of crm application which has huge sales data with all the customer leads etc (ASP.net 2.0/AJAx) i want to create a dashboard which will have four separate data containers each container will have different sort of data and each container has to update it self after some configred time interval . so ...

Events Overwritten in ASP.AJAX on IE7

Greetings! I'm calling a Web service from Javascript when a user clicks on a link. I need to get the coordinates where the user clicked so that I can display a DIV in an appropriate location. My client-side script looks like the following: var g_event; function DoWork(event, theId) { if (IsIE()) g_event = window.event; ...

Inheriting from an WebControl that implements IScriptControl

I am attempting to create a subclass of a web conmtrol that implements IScriptControl. I have managed to make the serverside chanegs that I need, and the control has happily inherited all of the clientside bahaviour from its base class. I now wish to add to this behaviour. Specifically I need my class to handle a javascript event that ...

Trying to apply RoundedCornerExtender to Table makes Table flash and vanish

I've been charged with prototyping a website that has, among other things, a section for "News of the Day", which is user-editable content. I'm using a Master Page and the default page for the site has a few divs for the various "front page" things they want displayed. In the 'newstoday" div, I have a table with an embedded ListView in...

Hidden panel doesn't center correctly when displayed

I've got a simple AlwaysVisibleControlExtender that extends a small Panel containing a "Loading..." message and animated GIF. The whole thing is inside an UpdateProgress control, so it only displays when my app is processing. I've got it set to display at the top center. It works fine, but I've noticed that it displays slightly to the ri...

Making an Asynchronous WebService Call From ASP.Net MVC

I would (as the question states) like to make an asynchronous call, preferably using ASP.net AJAX. The code for the WebMethod looks like this: [WebMethod] public void SendMail(string name, string email, string subject, string body) { MailMessage toSend = new MailMessage(email, [email protected], subject, body); var smtp = new Smtp...

Project Suggestion for ASP.NET MVC

I was thinking that i wanted to gain some experience in the new asp.net mvc and some asp.net ajax. So i'd like to get some project suggestions that would suite for this! Would maybe be fun to create a little bigger project on codeplex, like the storefront project. ...

When is it ok to disable event validation on a page?

I am using ASP.NET ajax to dynamically add/remove controls from a page without using full postbacks. The UI is very complicated. Under certain scenarios, when a control on the page causes a full postback, after changing the controls via async postbacks, I get this error: http://stackoverflow.com/questions/228969/aspnet-invalid-postbac...