Tag | AJAX Posts

I have lost recently some time to send a json parameter to my web service using jquery. Suppose that we have the data in an javascript array: var attributes=[]; $('#PreviewGroup1_DecisionA... input:checkbox').each(funct... attributes.push({attribute: elem.value, checked: elem.checked}); }); To send that array to web service we simply need to do $.ajax({ url: '../Services/PreviewFormWeb... dataType: "json", data: "attrs="+ JSON.stringify(attributes), ...
Project Silk provides guidance for building cross-browser web applications with a focus on client-side interactivity. These applications take advantage of the latest web standards like HTML5, CSS3 and ECMAScript 5 along with modern web technologies such as jQuery, Internet Explorer 9, and ASP.NET MVC3. To illustrate this guidance, the project includes a reference implementation called Mileage Stats that enables its users to track various metrics about their vehicles and fill-ups. Much of the effort ...
Thought I should bring this to attention since it’s a weird issue and the solution isn’t obvious when googling. The issue is - In MOSS an Ajax-Partial postback, causes the page to loose its page title. Like shown below So whats the fix? Appaprently additional spaces between the <title> and the <asp:ContentPlaceHolder> cause this issue. The solution is to remove the spaces. <title id=”onetidTitle”><asp... id=”PlaceHolderPageTitle” runat=”server”/></tit... ...
A new release of Microsoft All-In-One Code Framework is available on April 16th. This blog introduces 14 ASP.NET and Azure code samples in the release. The rest new samples will be introduced next week. Download address: http://1code.codeplex.com/r... Alternatively, you can download the code samples using Sample Browser v3. The new Sample Browser gives you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically ...
Ajax enabled data centric applications are getting popular day by day in web development space. While these type of web applications provide rich user experience, building a robust and powerful application quickly is a great challenge for developers. Fortunately Microsoft has started providing great frameworks, plug-ins and APIs to facilitate this process. Last week Microsoft announced a new version of java-script API “datajs”, which is intended to help web developers to build data centric AJAX applications ...
HTML5 introduces markup-level functionality for rich graphics, animation and web multimedia. It also supports a richer web application functionality and extends the client capabilities with local storage. Many pundits see it as the next generation web - web 3.0 if you like - and an open standard replacement for propriety plug-ins, Microsoft Silverlight and Adobe Flash. But, for all its new features, HTML5 is still only the end product. This article looks at HTML5 from the web programmer's point of ...
Recently, while browsing Visual Studio extensions I came across the SharpKit tool. It sparked my curiosity as I'm always looking for ways to improve my jQuery and Javascript in general. Working off the example in my previous post about Updating the Content of a WebGrid async we can generate the same Javascript via the SharpKit project. First, head to theSharpKit site to download and setup your first project (check out the Screencasts). Or search "jQuery" in Visual Studio 2010 extension manager. So ...
Hi All, just wanted to point out a teensy weensy but maybe very useful tip. It might be outdated information if you are using SharePoint 2010, but if you are using SharePoint 2007 then you might find this useful. I am sure all of you working with SharePoint has come across Heather Solomon through her blog, it being a really wonderful resource for skinning SharePoint. Heather also has provided a ton of help to the SharePoint community by sharing the minimal masterpages for WSS and MOSS. What I wanted ...
I’d like to invite you to a set of 2 webinars targeted for Visual WebGui newbies and beginners as part of the new completely free evaluation program for the Visual WebGui Experience. Visual WebGui (VWG) has gained its fame for its simplicity that lets core Microsoft developers, develop rich ASP.NET Ajax based Web, Cloud or Mobile applications just the way they are used to developing desktop .NET apps. With over 200,000 .NET developers that have adopted Visual WebGui to write over 35,000 VWG applications ...
UPDATE: Scott Hanselman has a NuGet package to automate many of these steps and you should check it out, http://www.hanselman.com/bl... This is in continuation with Part 1 of the article, so you may want to check it out before reading this, in case you haven’t already. Next, we need to enable the Global.asax. We will open up the Global.asax and add the following two references in the namespaces ...
UPDATE: Scott Hanselman has a NuGet package to automate many of these steps and you should check it out, http://www.hanselman.com/bl... Today, at Tech Ed India 2011, I delivered this session – Web Forms vs. MVC choosing the right one for web development. Although its a tricky topic, it was worth clarifying some of the patterns to decide between Web Forms and MVC. One of the demo scenarios I took ...
Employee Info Starter Kit is an open source ASP.NET project template that is intended to address different types of real world challenges faced by web application developers when performing common CRUD operations. Using a single database table ‘Employee’, it illustrates how to utilize Microsoft ASP.NET 4.0, Entity Framework 4.0 and Visual Studio 2010 effectively in that context. Employee Info Starter Kit is highly influenced by the concept ‘Pareto Principle’ or 80-20 rule. where it is targeted to ...
A new release of Microsoft All-In-One Code Framework is available on March 8th. Download address: http://1code.codeplex.com/r... You can download individual code samples or browse code samples grouped by technology in the updated code sample index. If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read this Microsoft News Center article http://www.microsoft.com/pr... or watch the ...
For those who are interested: The course looks at the features of the ASP.NET MVC 3 framework, including the new Razor View Engine, the new unobtrusive AJAX features, NuGet Package Management and more.. http://www.asp.net/mvc/plur... Technorati Tags: ASP.NET MVC,ASP.NET ...
Microsoft Tech ed 2010 was a great success. Infact Most of such conferences always provide a great place to meet other technology enthusiasts and ofcourse,whats in the pipeline for future products of a company or field.. And yet again,MS Tech ed India is coming on 23-25 march in Banglore,India.Well,the place is ofcourse right suited for any IT/Computing conference.After all,Its Silicon Valley of India.. From Last year.I remember a session by Harish about “Building pure client side apps with Jquery ...
It’s about 3 months later when I registered the SQL Azure Reporting CTP on the Microsoft Connect after TechED 2010 China. Today when I checked my mailbox I found that the SQL Azure team had just accepted my request and sent the activation code over to me. So let’s have a look on the new SQL Azure Reporting. Concept The SQL Azure Reporting provides cloud-based reporting as a service, built on SQL Server Reporting Services and SQL Azure technologies. Cloud-based reporting solutions such as SQL Azure ...
El objetivo de este post es preparar un ejemplo sobre un tema que es planteado muy frecuentemente en los Foros de MSDN, como realizar un Autocomplete contra una base de datos. Qué requerimos? Antes de poder realizar un Autocomplete debemos tener en cuenta los elementos principales que requerimos para poder hacerlo funcionar, descritos de la siguiente manera: 1. Textbox: Nuestro grandioso amigo Textbox, que será donde el usuario ingresará los datos a buscar. 2. Un Webservice: que contendrá el método ...
In this article i'm gonna show you how i do when i have to update some content with AJAX and i have to change the URL. First, let's see an example to understand it better. If the user is reading a News with Id 1 and he clicked on another News with Id 2, if we update the content with AJAX the user is now reading the News Id 2 but the URL remains the same, for example: http://localhost/News/Read/1 Now let's see another example from Facebook. If i'm reading my profile and i click on Photos, Facebook ...
Goal: As we all know the jqGrid examples in the demo and the Wiki always refer to static values for drop down boxes. This of course is a personal preference but in dynamic design these values should be populated from the database/xml file, etc, ideally JSON formatted. Can you do this in jqGrid, yes, but with some custom coding which we will briefly show below (refer to some of my other blog entries for a more detailed discussion on this topic). What you CANNOT do in jqGrid, referring here up and ...
I have one common piece of jQuery code which I use to submit a form any time the selection changes on a drop-down list (HTML select tag). This is similar to setting AutoPostBack = true in ASP.Net. I use a single CSS class (autoSubmit) to annotate that I want the drop-down to force the form to submit on change so the HTML looks something like this: <select id="myAutoSubmitDropDown" name="myAutoSubmitDropDown" class="autoSubmit"> <option value="1">Option 1</option> <option value="2">Option ...
OK, so for some reason you have a mega mashup solution with ASP.net AJAX, jQuery and web forms. Perhaps you are just on the migration from AjaxControlToolkit to the jQuery UI framework – who knows!! Anyway, the problem is that when you post back with something like an UpdatePanel, you will find that your nicely setup jQuery stuff, like the datepicker for example will no longer work. You may have something like this… $(document).ready(function () { $(".date-edit").datepicker({ dateFormat: "dd/mm/yy", ...
In this post I'll demonstrate how to make a simple collapsible menu using jQuery. To get started let's go ahead and fire up Visual Studio and create a new WebForm. Now let's build our menu by adding some div, p and anchor tags. Since I'm using a masterpage then the ASPX mark-up should look something like this: 1: <asp:Content ID="Content2" ContentPlaceHolderID="MainC... runat="server"> 2: <div id="Menu"> 3: <p>CARS</p> 4: <div class="section"> 5: <a href="#">Car ...
For quite a while I have been using the concept of base pages when developing pages in ASP.NET applications. It is a wonderful method for exposing common functions to all of your applications pages and also overriding certain events for various purposes (i.e. dynamic themes). Recently I found out a new developer will be joining my team. This prompted me to review the applications code for readability and ease of maintenance. I began adding comments through out the code behind for all pages within ...
Several iterations ago I implemented the SessionPageStatePersister in an application as a way to cut down on the size of the hidden ViewState input on aspx pages. At first it seemed utterly fantasic. The size of the ViewState appeared to be drastically reduced and the application did not appear to peform any slower than baseline. Enter the iFrame &amp; user control. I added a user control which pings the web server every 20 seconds in order to show updated application information to the user ...
While working on an ASP.NET application today I noticed that after asynchronous ajax requests my page would have gap where when the page initially loaded it did not. I checked the pages source and noted that a hidden input field was declared precisely where the gap was occuring. I moved the hidden input field to the end of the pages source and the gap went away permanently. Curious ...
If you want to consume a webservice, it's not allways necessary to do a postback. It's even not that hard! 1. Webservice You have to add the scriptservice attribute to the webservice. [System.Web.Script.Services... class PersonsInCompany : System.Web.Services.WebService { Create a WebMethod [WebMethod] public Person GetPersonByFirstName(string name) { List<Person> personSelect = persons.Where(p => p.FirstName.ToLower().Start... if (personSelect.Count ...
When we were working with ASP.NET MVC 2, we needed to write our own JavaScript to get Client-Side Validation Summary with jQuery Validation plugin. I am one of those unfortunate people still stuck with .NET Framework Runtime 2.0 and .NET Framework 3.5; meaning I am still on ASP.NET MVC 2. So I will still keep on supporting by answering any question you may have with my original code. Long awaited ASP.NET MVC 3 has been released, and it supports Client Side Validation Summary with jQuery out-of-the-box ...
The code samples in Microsoft All-In-One Code Framework are updated on 2011-1-23. Download address: http://1code.codeplex.com/r... You can download individual code samples or browse code samples grouped by technology inthe updated code sample index. If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read this Microsoft News Center article http://www.microsoft.com/pr... or watch the ...
I was playing around with CSS and ASP.NET AJAX Modal Popup Control and wanted to have a popup that has a rounded corner outer shadows on it without using images. After searching the web for an existing solution I found this link and tried to apply it on my modal. Luckily I was able to make it work. Here's the whole code for my experiment: 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... 2: <%@ Register Assembly="AjaxControlToolkit" ...
I read a blog post a few months back about client binding your Asp.Net GridView. It was Called Bind Gridview using Jquery. I took it to heart and now I'm using it, except it doesn't handle client sorting (paging is another story). Granted this has some room for improvement and my js isn't the best… Base Page method with the grid view: protected void SetHeaderAttribs(GridView grid) { for (int i = 0; i < grid.Columns.Count; i++) { TableCell cell = grid.HeaderRow.Cells[i]; DataControlField field ...
Tips and Tricks: ASP.NET AJAX 1.0 and User Controls Tips and Tricks: ASP.NET AJAX 1.0 and User Controls THANKS TO Bilal Haidar http://aspalliance.com/1274... ...
If you attempt to make an ajax call that cross domain or protocol boundaries, the default XHR (XmlHttpRequest) processor will fail. The out-of-the-box implementation forbids crossing boundaries. Enter flXHR. A flash-based proxy that implements (and extends) the XHR API. That’s good news for JQuery developers. It means you can use flXHR just like the native Jquery XHR. There’s also a Jquery proxy plugin that makes it SIMPLE. You can download the sample here. In my example, I’m hosting the website ...
Microsoft have now released Web Matrix (and ASP.NET MVC3 if you so inclined!) One signifcant utility is IIS Express which will replace Cassini It is worth noting that SP1 for VS2010 should be out in Q1. Links: http://www.hanselman.com/bl... http://www.hanselman.com/bl... http://arstechnica.com/micr... ...
Goal Upgrade your MVC 1 app to MVC 2 Issues You may get errors about your Json data being returned via a GET request violating security principles - we also address this here. This post is not intended to delve into why the Json GET request is or may be an issue, just how to resolve it as part of upgrading from MVC1 to 2. Solution First remove all references from your projects to the MVC 1 dll and replace it with the MVC 2 dll. Now update your web.config file in your web app root folder by simply ...
The AJAX SlideShowExtender is pretty useful. It does what it says and works without much fuss. There was one trick I needed it to perform that I could not find natively within the control. That was to set the slide’s current index. With a little JavaScript however I could make the control do what I wanted. The example below assumes a few things. First you already have a SlideShowExtender setup and working (or see this post). Second this SlideShowExtender is on a page all by itself so the index to ...
Google now has a feature where the search updates as you type in the search box. You can implement the same feature in your MVC site with a little jQuery and MVC Ajax. Here's how: Create a javascript global variable to hold the previous value of your search box. Use setTimeout to check to see if the search box has changed after some interval. (Note: Don't use setInterval since we don't want to have to turn the timer off while Ajax is processing.) Submit the form if the value is changed. Set the update ...
The code samples in Microsoft All-In-One Code Framework are updated on 2010-12-13. Download address: http://1code.codeplex.com/r... Updated code sample index categorized by technologies: http://1code.codeplex.com/w... (it also allows you to download individual code samples instead of the entire All-In-One Code Framework sample package.) If it’s the first time that you hear about Microsoft All-In-One Code Framework, ...
En este post, trabajaremos una parte que en ocasiones se nos hace un “mundo”, la creación de menús en nuestras aplicaciones web. Nuestro objetivo será evitar la utilización de elementos que puedan ocasionar que la página se vuelva un poco lenta, para ello utilizaremos jquery que viene siendo una herramienta muy semejante a ajax para crear nuestro menú. Para crear nuestro menús de ejemplo necesitaremos de tres elementos: 1. CSS, para aplicar los estilos. 2. Jquery para realizar las animaciones. 3. ...

I worked on several conversion projects where we had to convert java application into C#, asp.net application.

There is a tool on a market, that can help out with this kind of conversions.

http://www.creamtec.com/products/ajaxswing/

 

Enjoy it.

A simple and straight forward article taken from http://christopherdeweese.c... which uses WCF REST Service Template 40(CS) Drop the Soap: WCF, REST, and Pretty URIs in .NET 4 Years ago I was working in libraries when the Web 2.0 revolution began. One of the things that caught my attention about early start-ups using the AJAX/REST/Web 2.0 model was how nice the URIs were for their applications. Those were my first impressions of REST; pretty ...
All-In-One ASP.NET Code Samples Introduction Download ASP.NET code samples Request ASP.NET code samples Introduction The All-In-One ASP.NET code samples demonstrate the typical programming topics about ASP.NET. These topics are either frequently asked in MSDN forums and Microsoft Support, or are requested by many developers via our code sample request function. We want to alleviate the frustration felt by developers when they are developing ASP.NET projects. Visual Studio 2008 ASP.NET Code Samples ...
I was lucky enough to attend Visual Studio Live! in Orlando on November 14th-17th. There were so many great speakers and the networking was great. I met a lot of really cool people and we talked about everything .NET (from WP7, Silverlight, C#, ASP.NET WebForms, AJAX, MVC 3.. and so forth). I took a lot of notes during all the sessions and wanted to provide it to those that could not come out. If you follow me on Twitter then you have seen most of these. Most of the authors put slides/source code ...
It takes a short overview of Microsoft development tools and platforms evolvement in order to demonstrate the importance of supporting Web Forms development for ASP.NET Ajax with HTML5 enhancements. In an article that Todd Anglin publishes in Redmond Developers, under the title "Silverlight: What Web Forms Wanted to Be", Todd says that ASP.NET was supposed to be Web Forms. A framework that meant to duplicate VB6 ease of development or rather its more mature successor Window Forms. Asp.Net was expected ...
First, some background information: I have some javascript that requires data from the database to set values so I dynamically generate the script on the server via an action in my controller. I only want to do this generation when the partial view using it is dispalyed. So here is the problem: You have javascript you only want to load when a certain partial view is displayed. Depending on the state of data in the database, the partial view might load on page load or it might only load after an MVC ...
The code samples in Microsoft All-In-One Code Framework are updated on 2010-10-10. Download address: http://1code.codeplex.com/r... If it’s the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on YouTube http://www.youtube.com/watc... or read the introduction on our homepage http://1code.codeplex.com/, and this Port25 article http://port25.technet.com/a... ...
I've been seeing many developers in the forums asking: How can I display a message box from the server (code behind)? How can I customize the javascript confirm and alert popup? How can I display a message box like in windows application? As some of you may already know that displaying a pop-up message box has always been a pain for most developers in web programming. Everyone has probably used the Page.ClientScript.RegisterS... or the ScriptManager.RegisterClien... method to call ...
Latest announcements by Microsoft executives leave no doubt. Microsoft is shifting its support to HTML 5 and by doing so gives up on its RIA platform Silverlight which it repurposes for mobile. Adobe releases a Beta of a new HTML5 supporting tool kit, and by doing so also embraces the HTML5 option. It does look as if both give in to the market preferences for standard, no-plug-in and non-propriety option of HTML5 (see "Microsoft favoring HTML5 over Silverlight: reports" ). If we follow Microsoft's ...
Before working with MVC, I would claim to be somewhat intimidated by JavaScript development. Not that I did not know how to use it, however I found that is was much more bug prone and harder to develop against. Having the .Net compiler was a nice safety net-I did not have to worry about variable name mismatch, typos, not to mention the .Net framework itself. In a recent ASP.Net project we used the MS AJAX update panel to implement interface changes that could easily be implemented via client side ...
Sam Abraham (Me) presented an introduction to MVVM for WPF/Silverlight at the Ft Lauderdale ArcSig on Tuesday October 19th, 2010. With 43 registered attendees of whom many made it to the event, MVVM was sure proven to be a hot topic of interest. In a quick poll among the audience, many did develop WPF and/or Silverlight solutions, yet only one attendee had leveraged MVVM in code. A member of the audience reminded us that while our talk covered MVVM in the context of WPF, MVVM as a pattern is also ...
Sometimes it seems implementing functionality in ‘standard’ asp.net takes several times longer than with MVC. In my case, I wanted to do the following when changing a checkbox on a form page (page uses partial page update). Note that I needed to use both client side and server side functionality, and the page updates only part of the page. On checkbox changed, display an “are you sure” popupup. On ‘Ok’, call server method to modify data on the backend, re-bind part of the page. On ‘Cancel’, close ...