Tag | Javascript Posts

This book is more than just a book about an ASP.NET CMS system - it has much practical advice and examples for the Dot Net web developer. I liked the use of JQuery to detect that JavaScript was not enabled. One chapter was about MemCached - this one chapter could justify the price of the book if you run a server farm and need to improve performance. Some links to get you started are: Windows Memcache at http://code.jellycan.com/me... Dot Net Access Library at http://sourceforge.net/proj... ...
I’m going to start another series of posts that I’m calling C#/.NET Toolbox that will just contain little GUCs (Generic Utility Classes) I’ve developed along the way. If these already exist as part of the framework and I’ve overlooked them, feel free to let me know! And if you know of a better way to implement them, do the same! I’m never too old to learn something new (I hope!). Update: improved the ReverseComparer and added an extension method that will reverse any comparer instance. The Problem: ...
Goal: When loading js or css files, combine all the js files into one and all css files into one file respectively when rendering to improve on performance. Also compress if need be on the fly. In this example we use many css files and even more js files to organize the ASP.Net Mvc web app into manageable pieces. The reason for the separation is mainly because it gives the team the ability to work on different part of the web app by working on the affected css or js files. It also helps to decide ...
In this Issue: goldytech, Rob Eisenberg. Chris Rouw, Denis Gladkikh(-2-), Mike Taulty, Mohamed Mosallem, Mike Ormond, and Vuyiswa Maseko(-2-). Above the Fold: Silverlight: "Silverlight basics. Validation. Part 1. DataAnnotations & ValidatesOnExceptions" Denis Gladkikh WP7: "Live Tiles on a Schedule" Mike Ormond Blend: "Blend Bits 18–Sample Data" Mike Taulty Shoutouts: Rob Eisenberg has a contest going... check it out: Caliburn.Micro Contest Braulio Diez & Sebastian Stehle have a great-looking ...
In this Issue: Brad Tutterow, Kevin Dockx, Richard Waddell, Roberto Sonnino, Dustin Horne, Tim Greenfield, Rod Paddock, Timmy Kokke, Tim Heuer, Manuel Felício, Mike Taulty, and Brian Noyes. Above the Fold: Silverlight: "Using Visual States in custom controls in Silverlight" Timmy Kokke WP7: "Leveraging the Silverlight ecosystem with Windows Phone 7" Tim Greenfield Silverlight/JS: "JavaScript Can't Do Math - SilverlightCalculator A New Silverlight OSS Project" Rod Paddock Shoutouts: Telerik announced ...
In SharePoint 2010, Notifications is another way to display information/warnings without distracting user. It'll be shown in top right below Topbar and Ribbon. Just like Status bar, No Server side code or manual setup required to use Notifications. The required functions are bundled in SP.UI.Notify class that defined in SP.Js/SP.Debug.Js and it's included in SharePoint master page. So no manual include of Js is required. Well, Status bar is used to display content and to hide developer has to invvoke ...
Once again lets dive into the Little Wonders of .NET, those small things in the .NET languages and BCL classes that make development easier by increasing readability, maintainability, or performance. Today I’m going to focus a bit on the System.DateTime. This nice little value type (struct) has been in the BCL since the beginning, and while being broadly used to represent an instance of a date and time, there are many great properties, methods, and operators in this class that perhaps folks are less ...
In SharePoint 2010, Status bar is used to display information/warnings without disturbing user with Javascript alerts. Please don't think it is Browser's Status bar. It's a special information bar which displays below ribbon/top bar when invoked. No Server side code or manual setup required to enable status bar. The required functions are bundled in SP.UI.Status class that defined in SP.Js/SP.Debug.Js and it's included in SharePoint master page. So no need to include Js manualy to use Status bar. ...
A page which opened within dialog framework can pass some values(actualy single value) to parent page(Page which invokes dialog). Assume I have registration page which opened within Dialog. If Registration success then I have to pass a value otherwise different value to parent page. It's possible to pass single value with commonModalDialogClose(Retu... Once the registration completed successfuly then I want to show some message in the dialog itself and autoclose after few seconds. ...
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 ...
SharePoint 2010 provides pretty good dialog framework. Throughout SharePoint sites, Dialog framework has been used to avoid page redirections and keep user in same page. In SharePoint 2007 with help of Lightbox/JQuery, dialog framework can be enabled and used. But it has some limitations and time consuming. So how to open a page in Dialog framework? Well, It's pretty simple. Just add Content Editor webpart in the page and add the below code. <script type="text/javascript"> //User Defined Function ...
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 ...
In this Issue: Brian Genisio, goldytech, Martin Krüger, Shawn Wildermuth, John Papa, Kunal Chowdhury, Michael Washington, Joost van Schaik, Karl Shifflett, Joe McBride, Bruno Terkaly, Xpert360(-2-, -3-), and Brad Tutterow. Above the Fold: Silverlight: "Customized Scrolling in Silverlight using Expression Blend" Kunal Chowdhury WP7: "Windows Phone 7 Development for Absolute Beginners (The parts you care about)" Michael Washington Training: "In the Box – MVVM Training" Karl Shifflett Shoutouts: bspann ...
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 ...
If you build Silverlight Applications, chances are you have seen this screen before. I’m talking about the default “To view this content, please install…” Screen shown below. The Default Installation Screen. This is the screen that your users see when they first visit your site without Silverlight installed. It’s just plain ugly and most users do not know what it means. Take this example below by Netflix, they have alerted the user with a friendly: “You’re almost ready to watch…” Install Now. This ...
Last week we discussed returning immutable POCOs from an enclosing class so that you can prevent someone who asks for your class’s data to mutate it out from under you. Now we’re going to get a little more complex and talk about returning immutable collections from an enclosing class for the same reasons. I will discuss several different methods for returning collections in a read-only fashion with their pros and cons, including performance implications. The Problem Many times you will create a type ...
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 ...
Es el rendimiento de aplicaciones por mucho, una de las cosas que más nos preocupa durante el desarrollo de nuestras aplicaciones, y digo por mucho, porque en ocasiones es muy sencillo desarrollar una interfaz gráfica excelente pero se olvida una cosa, el costo de interacción que esto brindará al usuario. Vamos a ver una forma en la que podemos medir el rendimiento de nuestra aplicación con el fin de poder trabajar en las áreas más criticas para poder lograr un mejorarlo. 1. Para nuestro ejemplo, ...
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 ...
JavaScript was created to add interactivity to Netscape 2.0 back in 1995. A consequence of this limited scope is that the language was given only a minimal standard library. Should you ever try to solve a significant problem with JavaScript you will quickly feel the need for more advanced library methods than what JavaScript provides. Underscore.js Underscore.js is a library of utility functions for JavaScript. Most of the functions add functional capabilities to JavaScript. Simply add a script reference ...
Latest update (and hopefully last update): Microsoft has published a few posts to clarify the debate. Please consider the following: PDC and Silverlight by Bob Muglia PDC Thoughts by Steve Ballmer *NEW* Silverlight Questions by Scott Guthrie Silverlight is dead. Long live Silverlight! by Tim Heuer Committed to Silverlight by John Papa ---------------------------... Read the rest of this entry » ...
One of the things I sort-of miss from C++ (it has its good and bad) is the const modifier. Yes, while it’s true that we have a const modifier in C# (as well as readonly), but it’s not quite as robust. Many times you’ll want to return an internal member of a class but not want it to be directly modifiable by the user of that class. This article discusses how to present simple types as read-only. Note: I’m deliberately avoiding creating read-only views of collections in this particular article, but ...
Updated 2011-01-28 to reference the correct question stackoverflow.com Updated 2011-10-02 With a link to a sample application on github.Updated 2013-07-01 with corrected jQuery Cookie plug-in link and syntax In the web application I work on we sometimes need to create PDF documents based on some user input. In most cases, these documents are fairly simple and quick to create, allowing us to create the documents in memory and then send them back to the requesting user with a “Content Disposition: ...
With concerns of HTML 5 overshadowing or affecting the roadmap for Silverlight actively addressed in many blog posts, I decided to cover the value HTML 5 brings to another set of web-based Microsoft solutions: ASP.Net MVC 3 and WebMatrix. A direction to embrace HTML 5 can already be clearly seen in ASP.Net MVC 3 with Unobtrusive Javascript leveraging the “data-“HTML 5 attributes. Additionally, WebMatrix Razor site templates are already HTML5 and CSS3 compliant while continuing to be backwards compatible ...
faultcode:'sf:INSUFFICIENT_... faultstring:'ClassName: no access allowed to this class.', Salesforce Are you getting the above error in salesforce while the javascript is getting executed ? the reson is the user doesnt have sufficient access to the Apex class. Do the following and the issue will get resolved. Go to Setup->Develop->Apex Classses-> open the Class -> Click Security Button -> Add access to the profile from which you are trying to perform the action ...
If you have not looked at Murach’s books you should! They have a very convenient format, geared for training with two facing pages, the left with text and the right with an example with lists and descriptions. This book should get someone started on HTML and basic web pages, it covers html through some javascript and into simple website design and deployments. For me not much was new but I did pick up a few things including a better understanding of CSS floating div’s and how to use them. Another ...
The Little Wonders series received so much positive response I decided to make it a recurring theme in my blog as new ones popped in my head. There are two simple, yet great, LINQ extension methods you may or may not know about, but that can really simplify the task of converting collection queries into collections: ToDictionary() and ToList(). Introduction: LINQ and Deferred Execution Depending on your knowledge of LINQ, you may be oblivious as to what many of these query expressions do behind the ...
These days it seems that everyone has a crush on Ruby. I presented two sessions at this year’s Adelaide Code Camp: BDD with StoryQ and I Am IronRuby. After the standard IronRuby demonstration (creating a new project and scaffolding) I showed off some of what I like about Ruby. I started with a file containing Ruby comments describing nice features of the language. Then I worked my way through the script writing the Ruby to demonstrate each feature. The result is similar to my JavaScript Koans, but ...
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 ...
WebMatrix is a free “one stop shop” supporting all developers’ needs when creating web sites based on standard markup technologies (HTML, CSS, Javascript and jQuery). WebMatrix features an intuitive user interface to help minimize the learning curve and ease navigation and access to all application features. For instance, on startup WebMatrix enables the user to select of the following: 1-Existing sites created in WebMatrix 2-Obtain a site from one of the open source packages through Web Platform ...
In this Issue: Roberto Sonnino, Jonathan Marbutt, Jonathan van de Veen, René Schulte, Vikram Pendse, Andrej Tozon(-2-, -3-, -4-), Andrea Boschin(-2-), Jesse Liberty, Jeff Blankenburg, and Team XNA. Above the Fold: Silverlight: "Silverlight Layout States with Reactive Extensions" Andrej Tozon WP7: "WP7 Fast Tips: Load (decode) and Save (encode) Jpeg files" Andrea Boschin XNA on WP7: "New WP7 Games Educational Content on App Hub: Performance!" Team XNA Shoutouts: Joost van Schaik has instructions on ...
Chris Nicola left this excellent comment on Justin Etheredge’s blog: Even with a competitive way to do SSJS [(server-side JavaScript)] on the Windows platform, I just have to ask... why would anyone? Server-side JavaScript means that the server portion of a web application is written in JavaScript. Personally, I believe that server-side JavaScript will be the next big advance in web development. If I were Microsoft I would be looking to hit a touchdown out of the ball park with server-side JavaScript, ...
It bugs me when some commecial site gloms onto a perfectly good technology name and shoves irrelevant information down my browser's throat. Clearly www.Ja\/ascript.com (misspelled intentionally so that the assholes that own the domain name won't get a free reference from my blog) are only interested in making money from click throughs. Anyway, I attended the jQuery Conference this past weekend and I'm complying with Alex's directive to promoteJS.com. So, here y'go ...
Michael Minutillo posted the texas hold ‘em coding challenge to the oz alt.net mailing list. The challenge is to write a program that can take poker cards as input and return information about what hands players have and who is the winner. Solving this problem in my 9-to-5 language (c#) is not interesting to me, so I chose to do it with my beloved CoffeeScript. Compiling CoffeeScript The first challenge I faced was one that I have been working on for months – how to compile CoffeeScript on Windows. ...
Someone asked me the other day, between Standard ASP.Net and ASP.Net MVC, which do I prefer and why. Although I have long been an ASP.Net developer, I have to say that I easily would choose MVC over standard ASP.net any day (and twice on Sunday). I feel this for the following reasons: Separation of interests: The three sections of MVC are logically separated: Model(Data), View(.aspx page), Controller (Code that feeds data to view). NO VIEWSTATE: If you are new to MVC, you think this is a bad thing, ...
As I mentioned in my last post I talked some about how my side project, PiX Eyewear, has given me an opportunity to venture out of the predominantly server-side .NET programming that I’ve been doing at my “day job” for the past several years. In this post I’ll be digging into a simple way that I’ve been able to leverage jQuery to solve a little problem I had with my Shopify site. Before I go any further I want to call out an excellent approach for displaying “related products” on a product page that ...
So, I thought of another thing I’d like in my wish list of features I’d love to see in C# 5.0 and beyond. I’d like a format specifier to put the upper or lower case converted format argument into a formatted string. That is, let’s say you are building a distributed cache key that takes as part of the key the host name, but sometimes you may get the same host name in upper, lower, or mixed case on your distributed cache provider is case sensitive in its comparison and you have no control over that. ...
Facebook y es una gran herramienta para comunicarse. Ahora con los Social Plugins es factible llevar las redes sociales de Facebook a otros websites: likes, comentarios, feeds, etc. Eso es exactamente lo que quise agregar a mi blog para implementar los últimos gritos de tecnología y moda. Yo quería en particular la caja de comentarios donde los visitantes pueden comentar y poner Like, lo cual pueden permitir que aparezca en su wall de Facebook si están registrados. Si no están registrados, entonces ...
In this blog post, we will take a quick look at the new MVC 3 project options as well as the pretty sharp Razor View Engine (not suitable for shaving :) ). Based on a nice Stackoverflow post, it seems that MVC 3/Razor will only be supported in Visual Studio 2010/.Net 4.0. This is great as it will give developers yet another good selling point to argue for upgrading to .Net 4.0. Creating a new ASP.Net MVC 3 project Prior to ASP.Net MVC 3 Beta, Selecting “New Project” in VS 2010 yielded two templates ...
Update: I have now placed the zip containing the source for the end result of part 1 and 2 of this service template here. Two weeks ago I began the series with a discussion on how to make a new C# Windows Service template that is “debuggable” (you can find the article here). I had then intended the next week to follow up with a discussion on how to modify that template to make the service “self-installing”. Unfortunately, with my work schedule I wasn’t able to complete the series last week due to ...
See u ...
See u ...
See u ...
See u ...
I was working with a project that uses the concept of master page. Within the master page I have a bunch of UserControls for some specific purposes and one of the UserControl is for the site dynamic menu. The menu was basically built using JQuery and CSS. The menu works fine if you are using it as an anonymous user but if you logged in as authorize user the menu will no longer work for some odd reasons and produces the following script error below in the browser: Message: Object expected Line: 122 ...
I have waged and long and bloody battle to find a way to work with CoffeeScript on Windows – and now I finally have! The first step is to get CoffeeScript from github. You can either pull the source with git or download an archive after some hardcore archiving action. The CoffeeScript compiler is written in CoffeeScript and provided in compiled JavaScript form. Therefore, we need a server-side JavaScript environment to execute the compiler and transform our CoffeeScript scripts into JavaScript that ...
Following my announcement of a javascript koans project I am pleased to announce that I have published a draft of the project on google code. The topic ‘about prototypal inheritance’ is empty at the moment because I don’t feel that I understand it enough to write the koans. Please download and play with the draft JavaScript koans. Let me know if you learn something ...