Tag | AJAX Posts

Working with client-side technologies like JavaScript's and Ajax can sometimes be a pain in the butt. One practical example is if you’d like to display a message to the end user or do something else after all Ajax calls within the loop are completed. In this post I’m going to show how to make it work. Suppose that we have this JavaScript block below that iterates the table row to get the item ID stored in an input element and then call an action method from the controller through Ajax by passing ...
Have you ever had the need to implement a 3rd party JavaScript plugin, but your needs didn’t fit the model and usage defined by the API or documentation of the plugin? Recently I ran into this issue when I was trying to implement a web snapshot plugin into our site. To use their plugin, you had to include a script tag to the plugin on their server with an API key. The second part of the usage was to include a <script> tag around a function call wherever you wanted a snapshot to appear. The ...
Recommendation: Don't use the same action names for get and (Ajax) post.I am always amazed at how bad Microsoft's code examples are. Code generated using the default templates in Visual Studio is not much better. To find out, create an empty project (pick your favorite type) and run static code analysis or FxCop and see how many warnings you see. For some real fun try running StyleCop. The default templates (and therefore commonly-used standard practices) are also not very good in my opinion. Consider ...
I ran across a unique scenario recently, and I’m not sure if I should be proud of the solution, or appalled at the Frankenstein result. Either way, I thought I’d post about it to possibly help others in the same situation. I was developing a website leveraging jQuery / AJAX to query views of data at runtime. The kicker? I didn’t know which views. The choice of database view was determined via configuration and user choice. I was leveraging jqGrid for the client-side grid presentation, sorting, filtering, ...
I'm currently working on a project that utilizes Telerik AJAX controls, and I was required to create a new application that was to be setup as a child application to the primary project in IIS7 like so:-- Root application (/) +-- Child application (/Child)The child application needed to be configured in a way that it did not inherit the parent web.config values. In researching the approach to take for this, I found this article over on Rick Strahl's blog about stopping inheritance to child applications. ...
Few days ago I wrote a simple demo about “Using ProudMonkey Controls with ASP.NET AJAX Update Panel”. One small problem is that if for some reasons you will place the MessageBox control outside UpdatePanel then you’ll notice that the MessageBox will not display properly in the page. So if you were setting your html mark-up like this: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Assembly="ProudMonkey.Commo... Namespace="ProudMonkey.Comm... ...
I’ve been seeing many members in the forums asking how to display a large copy of the image on mouseover. Some of them are displaying the image in a Repeater, GridView or DataList control. I didn’t find any direct solution that shows the scenario they wanted so I thought of writing this post to demonstrate how to go about it. I know there are lot of ways of doing/implementing a solution for this scenario and this is just one them. In this example I’m going to use the DataList control for displaying ...
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; ...
Using a simulated dialog window is a nice way to handle inline data editing. The jQuery UI has a UI widget for a dialog window that makes it easy to get up and running with it in your application. With the release of ASP.NET MVC 3, Microsoft included the jQuery UI scripts and files in the MVC 3 project templates for Visual Studio. With the release of the MVC 3 Tools Update, Microsoft implemented the inclusion of those with NuGet as packages. That means we can get up and running using the latest version ...
So I was tasked with looking at converting 10 million tracks from mp3 320k to AAC and also Converting from mp3 320k to mp3 128k After a bit of hunting around the tool you need to use is FFMPEG Download x64 WindowsAlso for the best results get the Nero AACEncoder Download Now the command line STEP 1(From Flac)ffmpeg -i input.flac -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4aor (From mp3)ffmpeg -i input.mp3 -f wav - | neroAacEnc -ignorelength -q 0.5 -if - -of output.m4aNow the output.m4a ...
Today I was looking for a solution to get finally the JScript/Javascript/jQuery Intellisense Featureworking with my ASP.Net Webform Project to work. I found some good articles: - JScript IntelliSense Overview- JScript IntelliSense: A Reference for the “Reference” Tag- Enabling JavaScript intellisense in VS.NET 2010 to work with SharePoint 2010- Rich IntelliSense for jQueryBUT, all of suggested solutions did not work right with my Master Page based Visual Studio 2010 Solution.Only with physical Javascript ...
I am a 21 year old Web Developer, with over five years experience in the PHP field. Covering Javascript - jQuery & Ajax, mySQL, JSON and CSS. Out of the five years experience, three have been as a freelancer, the rest commercial work. (I have to say freelance is more comfortable whereas commercial really does get you to do things out of the box.) This blog will cover problems I come across and the solutions I came up with. Bringing ideas into reality - even if it's never been done before! Overall ...
So I thought I would change the name of my machine so that the other devs can find the TFS server easily. TFS 2005 would use the cool cmd line util tfsadminutil.....alas he is now gone HERE Are the steps to complete Edit the web.config and is usually located on default install C:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\web.config <add key="applicationDatabase" value="Data Source=JUSTIN\SQLI01;Initial Catalog=Tfs_Configuration;I... Security=True;" ...
Welcome back, in part 1 of Load and Web Performance Testing using Visual Studio 2010 I talked about why Performance Testing the application is important, the test tools available in Visual Studio Ultimate 2010 and various test rig topologies. In this blog post I’ll get into the details of web performance & load tests as well as why it’s important to follow a goal based pattern while performance testing your application. Tools => Options => Test Tools Have you visited the treasures of Visual ...
Today is the big day, the day I attempt to use Ajax in the app… I’ve never done this (well, tell a lie, I’ve done it in a ‘tutorial’ site, but that was a while ago now), so it’s going to be interesting.. OK, basics first, let’s start with the @Ajax.ActionLink Right, first stab: @Ajax.ActionLink("Click to get latest", "LatestEntry", new AjaxOptions { UpdateTargetId = "ajaxEntrant", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" }) As far as I’m aware, I’m asking to get the ‘LatestEntry’ ...
I was working with the built in ajaxtooljit HTMLEditor and for some odd reason, the color picker was showing off the screen. I noticed that the "TextEditorDivContainer" class of the control had position absolute. To solve this problem, I had to wrap the editor in a div with a class named "EditorWrapper" and change the position of the "TextEditorDivContainer" class to static. Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table ...
UPDATE The below sample just showcases the locality sample. The complete set of attributes exposed which include PostalCode, CountryRegion, Address etc., are available at http://msdn.microsoft.com/e... This is the third in the series of posts I am doing on HTML5 for ASP.NET Developers Geolocation is one of the popular features of HTML5 that’s being touted as a favorite for building location aware applications. It helps to a great extent not just for Web Applications that run ...
Today post will show you how to build an Ajax form with JQuery validate supporting (unobtrusive) client and server side validation using ASP.NET MVC 3. If you want to see an examples, you can visit this post about Ajax in ASP.NET MVC 3. To enable (unobtrusive) client side Ajax and validation support include the following JavaScript files (in Views/Shared/_Layout.cshtml): javascript" src="@Url.Content("~/Script... <script type="text/javascript" src="@Url.Content("~/Script... ...
Normal 0 false false false EN-US X-NONE X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans... ...
/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans... mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-... ...
I wrote a simple pager AjaxHelper extension. You can convert this to an HtmlExtension method by just removing the AjaxOptions and swapping out the AjaxHelper with HtmlHelper. This assumes that your parameter for the page name is "Page". 1: public static string Pager(this AjaxHelper ajaxHelper, int page, int pageSize, int count, int pages, string actionName, string controllerName, object routData, AjaxOptions ajaxOptions) 2: { 3: StringBuilder sb = new StringBuilder(); 4: int pageCount = count / pageSize ...
Yesterday I wrote this post but forgot to mention about something that is very close to my heart ASP.NET MVC. ASP.NET MVC has been evolving rapidly and within 2 years, we already have had 4 major releases (MVC 1, MVC 2, MVC 3 & MVC 3 Reloaded ) So, it doesn’t go as a surprise that MVC 4 is on the cards and the developer preview was unveiled at BUILD Conference. What does MVC 4 offer for web developers? Enhanced Default Project Template If you are bored with the vanilla blue template that comes ...

<script type="text/javascript" language="javascript">

        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(refresh);

        function refresh() { //Your code here; }

</script>

 

Source

A developer is asking how to pass data from a UserControl control to the main page. Basically, the scenario is that he has a user control which contains a GridView and wrap arround within asp Ajax UpdatePanel control. The UserControl will then be used at the page that is hosted within a master page. The page contains some TextBox in which it will be populated once the user selects a row from the GridView also on that page the Modalpop is defined. To achieve that, here's one solution I've provided ...
I am a reformed former JavaScript hater. In the 90s and early 2000s I muddled through JavaScript compatibility issues, poor performance and a lack of development & debugging tools. When ASP.NET came out, promising to hide me from the complexity of browser incompatibilities, I fully embraced server-side web development. This approach may have worked in 2002, but it does not today. The world's expectations have been reset by Ajax, Google Maps, mobile web sites, high performance JavaScript engines, ...
Rich internet applications are growing fast in the business and enterprise application landscape as more and more software managers and corporate decision makers are electing to place rich internet applications (RIA's) into their organizations. But with the many advantages of rich internet applications over the client/server deployments, organizations also find many new aspects they need to master and overcome - one of them is understanding the new security vulnerabilities of the rich web based applications ...
For a period of time, I have access to both an MSDN and a TechNet subscription. Both offer Microsoft software for download. I wondered what the similarities and differences were between the two subscriptions. I copied the two download lists into Excel and aligned them. Most of the material I would never use. Some products I have never heard of. I present the lists, current as of today, for your reviewing pleasure. TechNet MSDN Applications (63) Applications (79) Access 2.0 Access 2003 Access 2003 ...
I’m a big fan of client-side development using HTML / CSS / JavaScript for about the past 2 or 3 years – really ever since I dug into jQuery and really began to appreciate the power that the technologies on the client-side possess. Nowadays, everything is HTML / CSS / JavaScript – it’s in all the articles, all the techies are talking about it, and it’s on everyones’ resumes. In looking at candidate resumes or listening to presenters speak about web technologies, we constantly hear “HTML / CSS / JavaScript”. ...
Its been a while since I played with Web forms, AJAX stuff. I was curious in checking out, particularly how the AJAX Control Toolkit which used to be my favorite in the past is evolving. There is a new release of AJAX Control Toolkit, just hot off the oven. You can download the binaries from http://ajaxcontroltoolkit.c... Now, while the regular way we have downloaded and used AJAX Control Toolkit is by visiting the above codeplex page and download the latest version, there is also a newer ...
I am a firm believer that, regardless of the framework you use, if the framework is good it provides you all of the things you need. I believe ASP.Net MVC 2 is good and therefore provides me everything I need. This means I don't need to write a significant amount of custom UI code (jQuery, MVC Ajax, etc.) to do things that should be considered "standard". One of these pretty standard things submitting a form via Ajax. MVC provides for this very well with Ajax.BeginForm. The contents of the form are ...
This blog has been relocated to http://blachniet.com. See this post at it's new home: http://blachniet.com/2011/0... is post is meant to be a more straightforward overview of my previous post. The previous post got a little long and turned into a walthrough. If you need a walkthrough of this, check out that post at http://geekswithblogs.net/b... So in my new exploration ...
After writing this post, I realized that it is obnoxiously long, and maybe includes a little bit too much hand-holding. Nevertheless, I decided to post this very detailed step-by-step walkthrough of implementing a simple AJAX form in MVC3 with Razor. I'm probably going also post a shortened version of this topic for those that don't need a complete walkthrogh. So I've been attempting to dive into ASP.NET MVC 3 lately, and have hit plenty of bumps along the way. This is my first encounter with any ...
Desde que escribí mi primer post sobre como utilizar JqGrid con asp.net (http://geekswithblogs.net/... he recibido varias consultas sobre como realizar un maestro detalle utilizando este control de jquery. Antes de comenzar debo mencionar que para mostrar un maestro detalle con JqGrid tenemos dos opciones: 1. Realizarlo con un subgrid 2. Utilizar dos JqGrid separados Así que, teniendo esto en cuenta, el objetivo de este post será ...
I have a need for a highly responsive web page that must at least appear to be "pushed" information from the server as it happens, much like you'd see with an HTTP protocol based chat window. The client will utilize JavaScript, and will use JQuery and its UI plugins, and will use its AJAX support to call the requests that will only return when there is data to be "pushed". I know HTML 5 includes support for WebSockets, but I feel it is too soon to rely on them, as the spec is not yet finished and ...
I hope you haven’t come here looking for an answer!!! Because I want one too!!! I have recently been playing with JQM…and initially loved it….but…. I mean, jQuery mobile is fantastic...whats been done here I think is awesome. I'm enjoying working with it. (I know its beta 1!, but the below seems odd for even a beta release) There seems to be some fundamental bugs knocking about. Links for example. I have a fixed footer toolbar...3 buttons, Home, New, Settings. Home - I wanted to be non-ajax, so I ...
String Resources For string resources we will use local/global resources connecting to DB using DbResourceProvider from “Creating a Data Driven ASP.NET Localization Resource Provider and Editor” http://www.west-wind.com/pr... It also has DbResourceControl, that shows controls with Localizable attribute and connect them to editor. From http://guysmithferrier.com/... and http://www.guysmithferrier.... ...
Goal: Once you viewmodel has been built and populated with data, at some point it goal of it all is to persist the data to the database (or some other media). Regardless of where you want to save it, your client-side viewmodel needs to be converted to a JSON string and sent back to the server. Environment considerations: jQuery 1.4.3+ Knockoutjs version 1.1.2 How to: So let’s set the stage, you are using Knockoutjs and you have a viewmodel with some Knockout dependencies. You want to make sure it ...
I’ve read Combining Client Scripts into a Composite Script and wanted to use it. Then I’ve read Julian Jelfs concerns ScriptManager.CompositeScript issues However the article Combining javascript files with Ajax toolkit library describes workarounds, that make the solution workable. You also can use Script reference profiler: http://aspnet.codeplex.com/... Related posts: Using ScriptManager with other frameworks MSDN documentation: CompositeScriptReference The older implementations, ...
Query Templates, Data Link, and Globalization I am sure you must have read Scott Guthrie’s blog post about jQuery support and officially supporting jQuery's templating, data linking and globalization, if not here it is: jQuery Templating Since we are an open source shop and use jQuery and jQuery plugins extensively to say the least, decided to look into the templating a bit and see what data linking is all about. For those not familiar with those terms here is the summary, plenty of material out ...
If you have been using Ajax control toolkits a lot (which I will skip the parts on where to download and how to configure it in Visual Studio 2010), you might have encountered some bugs or limitations of the controls, or rather, some weird behaviours. I would call them weird behaviours though. Recently, I've been working on a Ajax numeric updown control, which i remember clearly it was working fine without problems. In fact, I use 2 numeric updown control this time. So I went on to configure it to ...
Since the demo of Windows 8 given by Microsoft Vice President Julie Larson-Green at the recent D9 conference windows developers have been described in many articles as feeling "Horrified" "Worried" "Deeply Concerned". Why? From the demo it seems that the new Window’s 8 ‘immersive’ applications will be based on HTML5 and JavaScript – which means for experienced win devs who have invested years in learning windows development platforms, they will now have to ‘re-train’ if they want to create these ...
MVC 3 is becoming hugely popular thanks to Razor and the Helpers that make building web applications much easier. One of the common requirements in web development, both with web forms as well as MVC based development, is the cascading dropdownlist. Now, for Web Forms, we can use a variety of options viz. server side programming, jQuery or using the AJAX Control Toolkit’s cascading dropdownlist control for accomplishing this. I saw a few samples on the internet that used the erstwhile Microsoft AJAX ...
When I've tried to deserialize dictionary whis strongly typed(and not string) keys, I've got an exception similar to the following Type 'System.Collections.Generic... System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d5... mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934... is not supported for serialization/deserialization of a dictionary, keys must be strings or objects. // Type Dictionary`2 ...
Jquery auto-complete, WCF Services and cross domain nightmares Gone are the days of using the Ajax toolkit, it’s far too bloated and can be very difficult to debug if anything goes wrong. So like many other developers I have made the conscious effort in swapping my attention to jQuery instead. I have recently been working on a project where I needed to implement a simple auto complete dropdown, so instead of reaching for the auto-complete extender from the Ajax toolkit I decided instead to use the ...
I had recently a very interesting problem. I have a single button on my page, which opens a jquery ui dialog with other page containing single textbox control. After pressing the Ok button, using web service the textbox value is sending to the server and a label control on the main page is updating and the update panel containing this label is refreshing. Vary simple solution. Maybe too simple, because I have lost a few hours to investigate, why after pressing the Ok button, full postback occurs ...
I dug up one of my first jQuery plugins and thought I would share. //thomas gathings //jquery plugin to enable confirmation of unsaved changes on common input elements. //apply to an ancestor, such as fieldset, div, or form. jQuery.fn.confirmUnsavedCha... = function() { var $obj = this; var saving = false; window.onbeforeunload = function() { //if local element data 'dirty' = true, show unload confirmation if (!saving && $obj.data("dirty")) { return "You have unsaved changes."; } }; //for ...
Luego de varios días de intenso trabajo, hoy he tomado un pequeño espacio de tiempo para dedicar un post al trabajo con datos en forma de tablas en asp.net Todos los que hemos trabajado desde hace bastante con asp.net, hemos aprendido a querer al GridView, un excelente control que nos permite mostrar los datos directamente desde una base de datos y trabajar con ellos, llamase trabajar a las operaciones de: editar, buscar, agregar y eliminar. Por supuesto que existen muchas otras opciones que no son ...
1. Set EnableScriptGlobalization=true on the script manager <asp:ScriptManager runat="server" EnableScriptGlobalization="... /> 2. Use the Sys.CultureInfo.CurrentCulture command either inside the alert or through Firebug console to check the CultureInfo at the client side 3. use Number.parseLocale instead of pareFloat so that it get correct value according to the current culture. 4. to update the value back with current culture use localeFormat <script type="text/javascript"> function ...
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 ...