Tag | ASP.NET Posts

Up to ASP.NET 3.5 Request Validation is enabled by default. In order to to disable this for a page you needed to set the ValidationRequest property in the page directive to false. This is no longer the default case in ASP.NET 4.0. If you want to use this behaviour you need to add the follwing setting in web.config <httpRuntime requestValidationMode="2.0" /> Of course you need to check all input in the page for XSS or other malicious input if you set the pages request validation to false ...
Just a quick one, seems pretty weird to me. I installed .net 4.0 on an old IIS6 box, ready to deploy a asp.net mvc app targeting .net 4.0. I thought, which to me seems logical, that I install .net 4.0, setup a new web site, new app pool, set the web site to asp.net 4.0 (other configuration also needed to run MVC on IIS6 here and here) and it would just work. Errr… No. The page cannot be displayed! Nothing to do with MVC. Apparently just because you have installed .net 4 and the option is available ...
Part 1 | Part 2 | Part 3 | Part 4 I wanted to create a series of blog post that gets right to the point and is aimed specifically at Silverlight Developers. The most important things I want this series to answer is : What is it? Why do I care? How do I do it? I hope that you enjoy this series. Let’s get started: Tip/Trick #11) What is it? Underline Text in a TextBlock. Why do I care? I’ve seen people do some crazy things to get underlined text in a Silverlight Application. In case you didn’t know ...
.NETTER Code Starter Pack contains a gallery of Visual Studio 2010 solutions leveraging latest and new technologies released by Microsoft. Each Visual Studio solution included here is focused to provide a very simple starting point for cutting edge development technologies and framework, using well known Northwind database. The current release of this project includes starter samples for the following technologies: ASP.NET Dynamic Data QuickStart (TBD) Azure Service Platform Windows Azure Hello World ...
Thank you to everyone who attended my Retrofit WebForms with ASP.NET MVC session at NoVa Code 2010.2. It was a fun event for me and I hope you had a great time and learned something from it. I wish I had more time to go over some more important topics in more detail. I *promise* I will be writing blog post series about it since I'll have some vacation time during the December holidays to cover some topics that I didn't get to cover in detail. Please note that the ".bak" file included in the zip file ...
In this Issue: Mike Wolf, Colin Eberhardt, Mike Snow(-2-, -3-), David Kelley(-2-, -3-), Jesse Liberty(-2-), Erik Mork, Jeff Blankenburg, Laurent Duveau, and Jeremy Likness(-2-). Above the Fold: Silverlight: "The definitive guide to Notification Window in Silverlight 4" Laurent Duveau WP7: "Making the MS Adcontrol REALLY work on phone 7" David Kelley Silverlight 5: "Silverlight 5: In the Trenches" Mike Wolf From SilverlightCream.com: Silverlight 5: In the Trenches How many people can discuss Silverlight ...
Today's Apress Deal of the Days is Pro ASP.NET 4 in C# 2010, Fourth Edition - at $10 for the book, it is a bargain! I am currently reviewing this book and have been impressed by it. I suggest that you go over to http://www.apress.com/info/... and buy a copy. The book has a brief introduction to C# and then gives a thorough grounding in ASP.NET. The offer will be available to 08:00 Hrs UTC on the 12/Dec ...
We are going to see how we can show localized content to your ASP.NET MVC web application. We will see mainly two approaches- Approach 1: Using Static Pages We can go for this approach only when we have few/limited static localized pages. Approach 2: Using Dynamic page with localized data at runtime We should go for this approach if we have large number of pages to show a data in localized format. In this approach we can either use resource file or directly data from database. For details about the ...
Just thought I’d pass on the word that the Visual Studio 2010 Service Pack 1 Beta is now available to download. VS2010 SP1 Beta ships with a go live license which means you can start using it for production work though I’m not sure I’m going to be that brave until I check it out a bit first. Jason Zanders has a blog post outlining the new features/fixes included in the beta. Here are a couple BREAKING news items you’ll want to TakeNote of… VS2010 SP1 Beta BREAKS ASP.NET MVC 3 RC Razor IntelliSense. ...
Recently I wrote a series of blog posts that demonstrates how to do calculation in GridView using JavaScripts. You can check the series of posts below: FAQ: GridView Calculation with JavaScript FAQ: GridView Calculation with JavaScript - Formatting and Validation FAQ: GridView Calculation with JavaScript - Displaying Quantity Total Recently a user in the forums is asking how to calculate the total quantity, sub-totals and total amout in GridView when a user enters the price and quantity in the TextBox ...
Previously we've talked about how calculate the sub-totals and grand total in GridView here, how to format the numbers into a currency format and how to validate the quantity to just accept whole numbers using JavaScript here. One of the users in the forum (http://forums.asp.net) is asking if how to modify the script to display the quantity total in the footer. In this post I'm going to show you how to it. Basically we just need to modify the javascript CalculateTotals function and add the codes ...
In my previous post here we've talked about how to calculate the sub-totals and grand total in GridView using JavaScript. In this post I'm going take more step further and will demonstrate how are we going to format the totals into a currency and how to validate the input that would only allow you to enter a whole number in the quantity TextBox. Here are the code blocks below: ASPX Source: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... ...
In my previous post I wrote a simple demo on how to Calculate Totals in GridView and Display it in the Footer. Basically what it does is it calculates the total amount by typing into the TextBox and display the grand total in the footer of the GridView and basically it was a server side implemenation. Many users in the forums are asking how to do the same thing without postbacks and how to calculate both amount and total amount together. In this post I will demonstrate how to do this using JavaScript. ...
Part 1 - Listing Data from Database: Let us now learn ASP.NET MVC 2 from Scratch by actually developing a front end website for the Chinook database, which is an alternative to the traditional Northwind database. You can get the Chinook database from here. As always the best way to learn something is by working on it and doing something. The Chinook database has the following schema, a quick look will help us implementing the application in a efficient way. Let us first implement a grid view table ...

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.

With all the news and focus on the new features coming in Silverlight 5 I thought I’d take a few minutes to remind folks about the work that Microsoft has done on LightSwitch since the applications created by LightSwitch are Silverlight applications. LightSwitch makes it easier for non-coders to build business applications and easier for coders to maintain them. For those not familiar with LightSwitch, it is a new tool that provides a easier and quicker way for coder and non-coder types alike to ...
In this (Almost) All-Submittal Issue: John Papa(-2-), Jesse Liberty, Tim Heuer, Dan Wahlin, Markus Egger, Phil Middlemiss, Coding4Fun, Michael Washington, Gill Cleeren, MichaelD!, Colin Eberhardt, Kunal Chowdhury, and Rabeeh Abla. Above the Fold: Silverlight: "Two-Way Binding on TreeView.SelectedItem" Phil Middlemiss WP7: "Taking Screen Shots of Windows Phone 7 Panorama Apps" Markus Egger Training: "Beginners Guide to Visual Studio LightSwitch (Part - 4)" Kunal Chowdhury Shoutouts: Don't let the ...
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 ...
If you didn’t get chance to watch the Silverlight Firestart event live during the webcast it is available online to view now. If you’re a Silverlight developer or perhaps a shop actively planning on developing a Silverlight application then you’re going to want to watch this video. The Silverlight 5 feature set unveiled during the keynote is fantastic! I particularly like Scott’s approach and comments on the future of Silverlight. I appreciated his open and direct acknowledgment that there has “been ...
So Silverlight Firestarter is over and your sitting on your couch thinking… what now? Well its time to So how exactly can you pimp the Silverlight Firestarter? Well read below and you will find out: 1) Pimp the videos: First we are going to use a program named Juice to download all of the Silverlight Firestarter videos. Go ahead and point your browser to http://juicereceiver.source... and download the application. It works on Mac, Linux and PC. After it is downloaded you are going to want ...
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... ...
In my previous post here, I wrote an example that demonstrates how are we going to generate table rows dynamically using ASP Table on click of the Button control. Now based on some comments in my previous example and in the forums they wanted to implement it within Masterpage. Unfortunately the code in my previous example doesn't work in Masterpage for the following main reasons: The Table is dynamically added within the Form tag and so the TextBox control will not be generated correcty in the page. ...
If you haven’t already signed up, there is a Silverlight Firestarter event happening today and kicks off in a little under an hour! Sign up here!!!!! ScottGu starts of with a keynote entitled “The Future of Silverlight”. Sounds like a good thing. Here is the rest of the agenda(All Times PST): 9:00 am Scott Guthrie The Future of Silverlight 10:45 am Jesse Liberty Data Binding Strategies with Silverlight and WP7 11:30 am Yavor Georgiev Building Compelling Apps with WCF using REST and LINQ 12:15 pm ...
In this Issue: Paul Juenger, Dimaz Pramudya, Johan Dahlbäck, Judah Himango, Andy Wigley, Jesse Liberty, Jeremy Likness, Michael Crump, Mike Taulty, Kevin Dockx, and Paul Sheriff. Above the Fold: Silverlight: "Build a Pandora clone with Silverlight 4" Judah Himango WP7: "Using Isolated Storage on Windows Phone" Paul Sheriff Blend: "Blend Bits 19–Transformations" Mike Taulty Shoutouts: Karl Shifflett has posted Updated In the Box MVVM Training Colin Eberhardt posted a preview of what he's currently ...
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 ...
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 ...

The Apress Deal of the day for today at http://www.apress.com/info/dailydeal is for Pro ASP.NET 4 in C# 2010, Fourth Edition

At $10 for the PDF, it is a bargain!

I've gotten used to Resharper's recommendation for defensive coding (see http://en.wikipedia.org/wik... – never trust the client! private void Bar(string x){ if (x == null) return; But how to get this to play with Design By Contract using Code Contracts? I had a look at http://weblogs.asp.net/gunn... - which shows me how to leverage the ContractFailed event and throw my own exceptions. I don't want to throw ...
Whilst reading Pro ASP.NET 4 CMS (ISBN 987-1-4302-2712-0), I came across an excellent site for generating test data. The site is http://www.generatedata.com You can select the data items to generate. You can select sub-types of data e.g. UK post codes or US Zip Codes. You can country type of data You can select output format such as Excel, CSV, XML, Oracle SQL, My SQL SQL and others ...
I have started reading Pro ASP.NET 4 in VB 2010 (ISBN 978-1-4302-2511-9). While I will be returning to this book later, I would like to point out one particular topic "Accessing the HTTP Context in Another Class". The particular context is that of accessing Trace. HttpContext.Current.Trace.W... Whilst this would seem a trivial piece of code, it saves passing the context, when calling a function as the function can get access to HttpContext.Current.Request... HttpContext.Current.Request... ...
Goal: For performance reasons you want to load a piece of CSS only for the ascx file to which it applies. You do not want to embed the style as you cannot do this in ASP.Net ascx user controls. ASP.Net will render the style tag as HTML text. Solution: Some folks use the Page.Header.Controls. Add to add the stylesheet link in the ascx page or in the code behind. Not needed, you may specify a "link" tag in the ascx file, no need to specify "head" tag or anything else, just the link tag itself: <link ...

A new article is up that discusses how to pass values to SSRS reports at runtime from web forms. Please find it here.

Sam Abraham (Me) will be speaking at the West Palm Beach .Net Users’ Group on Tuesday November 23rd, 2010 on ASP.Net MVC3 RC, Razor syntax, ASP.Net Web Pages Helpers and NuGet. I plan on sharing an introduction to ASP.Net MVC to bring everybody up to speed then explore the latest features of the ASP.Net MVC 3 Release Candidate. I will also introduce the NuGet Library Package Manager. I hope for this talk to act as a platform for everyone to share their thoughts on ASP.Net MVC and provide their take ...
In this Issue: Dan Wahlin(-2-), Kirupa, Jeff Handley(-2-), Mike Snow, Robby Ingebretsen, David J. Kelley, Jonathan van de Veen, Lee, and Walt Ritscher(-2-). Above the Fold: Silverlight: "Prism 4 – Silverlight and Custom Commands" Lee WP7: "Windows Phone 7 Themed Videos" Kirupa Expression Blend: "Building and Using Expression Blend Behaviors" David J. Kelley Shoutouts: The Studio 6 Software Blog folks have updated their ComboBox... check out the demo, and grab the code: Silverlight ComboBox Updated ...
In this Issue: Kunal Chowdhury, John Papa, Jesse Liberty(-2-), Den Delimarsky, Paul Sheriff, Charles Petzold, Brad Tutterow(-2-), Alexander Viken. Above the Fold: Silverlight: "Using ValueConverter to Show/Hide Element in Silverlight (MVVM)" Kunal Chowdhury WP7: "Playing Music Files on WP7" Charles Petzold Shoutouts: Rob Tiffany has been kind enough to aggregate some (all?) of the Windows Phone 7 Demo Fest Tech Ed Video From SilverlightCream.com: Using ValueConverter to Show/Hide Element in Silverlight ...
In this Issue: Martin Krüger, Vikas, Kevin Dockx, Brian Noyes, Kunal Chowdhury, Gergely Orosz, Garry McGlennon, René Schulte, Matias Bonaventura, Bart Czernicki, and Dennis Doomen. Above the Fold: Silverlight: "How to: create a nonrectangular ChildWindow - part 1" Martin Krüger Prism: "Prism Training Kit: Updated to Prism 4.0" Matias Bonaventura Shoutouts: Component Ways has a releast of their xamlDataGrid for Silverlight... might be worth a look ... check out the feature set and download the eval. ...
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 ...
There is a bunch of cool stuff coming out of Microsoft right now. As I’ve previously blogged, WCF Web APIs is one of them. One of the cool things that was shown by Glenn Block at PDC a couple of weeks ago was Media Type Processors. Media Type Processors provide a way to allow the consumer of your service to be able to specify the format they want on their response simply by setting the Accept header on the request (and thereby allowing your service to conform to HTTP standards). Out of the box, WCF ...
I had the pleasure of attending and speaking at the Tampa .Net Code Camp 2010. I covered MVC3 and NuGet. I also leveraged the lunch break to show most of Scott Hanselman’s highly rated open source PDC10 session. To watch Scott’s video please visit: http://www.hanselman.com/bl... Mr and Mrs. Keith Kabza and the VisualGov team’s hard work was quiet visible at the nicely organized event where all went smooth from early morning registration to ...

I spent the better part of a day trying to figure out why all of the sudden, I was unable to properly debug, add quick watches or see the values of fields etc at all.  I found it was because I had installed ASP.NET MVC3 along side AsyncCTP. 

I found instructions to resolve the issue here http://bartwullems.blogspot.com/2010/11/dont-install-async-ctp-and-aspnet-mvc-3.html

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 ...
UPDATE: with the release of NuGet 1.0 RTM, this script has some breaking changes. For an updated version, see this post by Jon Galloway: Downloading a local NuGet repository with PowerShell. NuGet is simply awesome. Despite its relative infancy, it has already established itself as the standard for .NET package management. You can easily add packages from the public feed or even from a local directory on your machine. Phil Haack already has an excellent post describing how you set up a local feed. ...
Scott Guthrie just announced the release of ASP.Net MVC 3 RC. This new release features Intellisense and syntax colorization for Razor pages. It also includes the recently renamed NuGet (formerly known as NuPack) Library Package Manager. If NuGet is new to you, please check my blog post providing a quick introduction to this useful package. I also have a quick overview of Razor that you can reference if needed. For the authoritative and complete information, please check ScottGu’s blog. To install ...
ASP.Net Web Pages Helpers are re-usable components made of both HTML markup mixed with C# or VB.Net code. Helpers are designated using a special Razor Syntax tag @helper which routes the content within the tag to the appropriate Razor parser. (A brief introduction to the Razor syntax can be found here) I had the privilege of demonstrating a few out-of-the-box Web Pages Helpers using WebMatrix at the SoFla Local PDC10 a little over a week ago. Audience feedback was positive and Helpers' lightweight ...
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... ...
The common question as a SharePoint consultant and developer is, "Should we use SharePoint or not?. I was faced with that decision this week and I thought I would share it. I am working with a solution that involves an ASP.Net Application being connected to SharePoint that was being used as the document management piece of the solution. The Asp.Net application had a feature that created a project. Part of creating a project required creating a document library in SharePoint as part of that creation ...
I want to introduce a new tool that can bring a huge change to your life by upgrading your Client/Server applications to a Web or Cloud based environment. Most of us are intimidated even by the thought of migrating a large, mission critical application to any technology. If it ain't broken why fix it, right?! However, Visual WebGui is a unique platform that its architecture allows to convert .NET applications to ASP.NET VWG based Web and Cloud (SaaS) in a simple path and practically no risks since ...
In this Issue: Michael Washington, Peter Kuhn, Bill Reiss, Lee, Walt Ritscher, John Papa, Kunal Chowdhury, cherylws, Jeremy Likness, Martin Krüger(-2-), Michael Crump, and Brad Tutterow. Above the Fold: Silverlight: "I know what you downloaded last summer" Peter Kuhn WP7: "Free fonts for commercial game development" Bill Reiss Training: "A couple of more data-related Silverlight Quickstarts for you" cherylws Shoutouts: Martin Krüger has an accordian style published in Expression Gallery: New accordion ...
The C# Programming Language, Fourth Edition by Anders Hejlsberg, Mads Torgersen, Scott Wiltamuth, and Peter Golde Publisher: Addison Wesley (Special Annotated Edition for C# 4.0) I can honestly say I have had a copy of this book for each edition it was published. I love this book and have always loved it. Ever since Microsoft stopped publishing the White Reference Guides we used to all have back in the day, Addison Wesley has became my reference book dealer. These White cover books with the most ...
Our SQL Azure book is finally done! After months of work, research (and waiting for Service Updates ) the book is finally finished. We spent a lot of time on this book, and we wanted to let you know it is out and ready for reading. It should be available on Amazon and other sites know. For topics, we cover the following: Getting Started with SQL Azure SQL Azure Design Considerations Setting up and Configuring your SQL Azure Environment Security Data Migration and Backup Strategy Programming SQL Azure ...