background preloader

TutsPlus

Facebook Twitter

How to Search a Website Using ASP.NET 3.5 – screencast. I'm happy to say that today, we are posting our very first article on ASP.NET. In this screencast, I'll show you how to implement a simple search functionality into your personal website. We'll go over many of the new features in ASP.NET 3.5, such as LINQ and many of the AJAX controls that ship with Visual Studio/Web Developer.

Mission Statement We will be building a simple search functionality for our site. What You Need to Know In this screencast, I will assume that you have some knowledge of the framework. Step 1: Creating The Database I'll be creating a "Blog" database. Step 2: The Listview Control The wonderful thing about the listview control is that it allows you to maintain 100% control over your mark up.

LayoutTemplate: This template serves as the wrap for each item. Within the item template, I've specified that the listview control should only display a hyperlink. Step 3: LINQ Step 4: AJAXifying Our Page Note the "Triggers" tag. Step 5: User Feedback You're Finished. ASP.NET from Scratch: Lesson 1. ASP.NET from Scratch: Lesson 2. ASP.NET for PHP Developers. This tutorial, for PHP developers, will provide you with an introduction to ASP.NET using the C# language. If you've wondered what ASP.NET is about, this tutorial will strive to answer at least some of your questions.

Even if you're an ardent open-source fan, ASP.NET contains some techniques and features that are useful to know about. And, as some might say, it's good to know your enemy! ASP.NET is no longer a Microsoft-only technology. Thanks to the hard work of the Mono project contributors, ASP.NET can be used on Linux and Mac platforms, as well as Windows. They've even created an IDE within which you can write your web and desktop applications. ASP.NET is Microsoft's web development technology framework, and was originally designed as a replacement for the old Active Server Pages technology. As this tutorial is aimed at PHP developers, who a lot of the time prefer to get "closer to the metal," I won't be using either of these.

In C# it would cause an error. ASP.NET for PHP Developers: Part 2. In part one of the "ASP.NET for PHP Developers" tutorial, we learned the basics of ASP.NET and the C# language. Part two builds on that foundation, and introduces some more advanced features and techniques to take your ASP.NET pages to the next level. Before you Start... Ensure you have read and completed the examples in part 1 of the tutorial.

We'll be building on that application here. It's also worth stressing that you need a good grasp of object oriented programming (OOP) to continue. And Before I Start... I mentioned in part 1 of the tutorial that there are two flavours of ASP.NET available: ASP.NET WebForms: the original framework allowing developers to create web applications using many of the same techniques used in .NET Windows desktop applicationsASP.NET MVC: a newer framework offering Model-View-Controller architecture and more control over client-side code However I don't use either of those, but rather a third approach of my own devising. Master Pages Creating a master page Gives:

.NET LINQ from Scratch. As software developers, we spend a lot of time extracting and displaying data from many different data sources. Whether it's a XML webservice of some sort, or a full featured relational database, we have been forced to learn different methods of data access. Wouldn't it be great if the method of access was the same for all data sources? Well, we are in luck because, as of the release of C# 3.0 and the .NET 3.5 Framework, LINQ has come to change the game forever. Tutorial Details Introduction to LINQ syntaxProjections using LINQRefining dataStandard operators Current Data Access Overview On the .NET platform we have been and still are utilizing ADO.NET for accessing different data sources.

Language Integrated Query is the new addition to the .NET family and as the name suggests it's the kind of query style data access which is fully supported by the language to effectively unify the way we access data and to make our lives easier. LINQ to Objects This is exactly where LINQ shines best. Joins. A jQuery UI and .Net Image Organizer. Over the course of this tutorial we'll look at how to create a simple image organizer that lets users reorder a series of images; this functionality could be useful on any kind of image-based site where users have a collection of images that they have uploaded or otherwise added to their profile or account. We'll use .net to retrieve and store the order of images in a SQL database on the server, and jQuery UI to handle the reordering of the images on the client.

Getting Started The page we create will be of the type aspx; we can create and edit these files with a simple text editor if necessary, but it's far more efficient to use a proper .Net IDE. Visual Web Developer Express from Microsoft is a great .Net IDE and it's completely free; grab a copy now from It can be downloaded as part of the Web Platform; you can choose a range of different products when you download it, for the purposes of this tutorial we'll be using the following components:

How to Build a Simple Twitter Widget with ASP.NET. In this tutorial, I'll be walking you through how to a write a Twitter widget for ASP.NET in the form of a reusable server control complete with nice things such as automatically turning URLs into links, and caching to speed up page load times. Step 1 Getting Started To follow this tutorial, all you need is Visual Studio (You can use MonoDevelop if you're not on Windows, although there's no guarantees there.)

If you don't want to fork over cash for the full version of Visual Studio, you can grab the free Express Edition. You'll also need knowledge of C# 3.0, as this tutorial makes use of some of the newer features of the language, such as lambda expressions and the var keyword. Step 2 Creating the Control ASP.NET includes a handy feature known as Server Controls.

Once you've created a new Web Application in Visual Studio, right click in the Solution Explorer and add a new item to the solution. This is about as basic as you can get for a Twitter widget. Step 3 Using the Control Step 5 Caching. ASP.NET from Scratch: Routing in MVC. How to Build an RSS Feed with ASP.NET. Over the course of this tutorial, we’ll review how to create an RSS Feed with the ASP.NET framework. Having an RSS feed for your site has become a necessity in recent years. With blogs or news sites being updated frequently, and with the vast amount of blogs and news websites out there, RSS has allowed readers to keep up with new content without being forced to visit them. Once you've completed this tutorial, you'll know how to create an RSS feed with ASP.NET, and how to render XML documents on ASP.NET Web pages. Step 0: RSS 2.0 Introduction RSS is a web content syndication format.

It stands for "Really Simple Syndication," and is written in XML. All RSS files must conform to the XML 1.0 specification, as published by the World Wide Web Consortium (W3C). The syntax rules of RSS 2.0 are quite simple, though strict. The first line in the document - the XML declaration - defines the XML version and the character encoding used in the document.

The next line contains the <channel> element. ASP.NET and AJAX. In this tutorial, we'll take a look at some of the things you can do with ASP.NET and AJAX in your web applications. It's more than just wrapping an UpdatePanel around some buttons, textboxes and grids! Asynchronous JavaScript and XML There are many caveats with arbitrarily dropping UpdatePanels onto webforms and hoping for the best. Though this tutorial will focus primarily on other components besides the UpdatePanel, it might be useful to take a look at postback triggers as well. Wrapping some controls on a webform in an UpdatePanel is a cheap and cheerful way of implementing Ajax. Postbacks caused by the web controls in the UpdatePanel should happen asynchronously and not cause an entire page postback. There are, however, many caveats with arbitrarily dropping UpdatePanels onto webforms and hoping for the best. UpdatePanel An UpdatePanel control specifies what regions of a page can be updated asynchronously.

Create a new ASP.NET Web Application project. Controlling UpdatePanel Updates. Generating Traditional URLs with ASP.NET MVC3. There are certain truths in the world: we're born, we die, and URLs should end with a slash if it doesn't point to a file. The ASP.NET MVC framework bucks tradition and convention, and the built-in methods that generate URLs do so by omitting the trailing slash.

It may seem like a non-issue (and to many people it's not one), but many developers, this author included, are bugged by them. First, Some Background URL stands for Uniform Resource Locator; it tells web-aware clients where to locate a particular resource on the Internet. The URL of points to a physical file (the resource) called file.html that resides in a directory called directory on a web server found at the example.com domain.

When the web server for example.com receives a request for that URL, it knows exactly where to look for the resource. Traditional web servers do the same thing for directory requests. Consider the URL of Wait, wait, wait! ASP.NET AJAX Server Controls with Client-Side Functionality. Over the course of this tutorial, we'll look at how to create a custom ASP.NET AJAX server control as a wrapper for the Google Maps JavaScript API. The server-side code will be written in C# (which I highly recommend), but it could just as easily be written in VB.NET. The focus will be on creating the control, and we'll take a good look at the whole process of creating a custom ASP.NET AJAX server control, with client side functionality as well.

Getting Started If you don't already have Visual Studio installed, you'll want to grab the latest express edition. Once that's done, fire it up and go to File -> New -> Project. Looking in Solution Explorer, you'll notice that Visual Studio has generated some files for us already. Rename ClientControl1.js to GoogleMap.js Rename ClientControl1.resx to GoogleMap.resx Rename ServerControl1.cs to GoogleMap.cs Now, hit Control + H to bring up the Quick Replace window.

GoogleMap.js - Client-Side Let's break GoogleMap.js apart piece by piece. Adding Markers. Building an ASP.NET MVC4 Application with EF and WebAPI. ASP.NET MVC has come a long way since "The Gu" jotted down some ideas during an airplane ride to a conference in 2007. In just under four years, ASP.NET MVC has seen its fourth release, and it provides developers an environment that eases development, streamlines processes, and promotes modern patterns.

Jumping right in is one of the best ways to get a handle of new technology. Let's go ahead and dive right into teh codez! Setup I will be using Visual Studio 2012 Release Candidate, which is available here. Once VS 2012 is up and running, go ahead and create a new project. Note: the code for this demo application is located in a Github repo. Entity Framework I am going to use Entity Framework (EF) Code First for the data model. Our application will be a review site for reviewing... stuff. Now write the Comment class. The comment class has an Id property for the primary key, Content of the comment, an Email property, and an IsAnonymous flag for users. Last is the Category class. WebAPI. Building an ASP.NET MVC4 Application with EF and WebAPI.