Stories Tagged with 'ASP.NET'


Sample Code for Custom ASP.NET Profile Provider

Url: http://wilderminds.blob.core.windows.net/downloads/adoguy.profile.zip

Until The ServerSide .NET can post the sample code, I am posting it here

ASP.NET AJAX RTM and WCF Do Not Play Well Together...

Url: http://ajax.asp.net/files/AspNet_AJAX_CTP_to_RC...

I am delving into WCF and AJAX (not at the same time) lately so I wanted to see if they were compatible.  According to this whitepaper on ASP.NET (follow the link and scroll down to "Support for WCF Web Services"), the RTM of AJAX does not support WCF.  It seems they removed it so they could make it work better in a later release.  The promise is that by the Orcas release of VS, they will be compatible. 

ASP.NET 2.0 TreeView without Postback? Solved!

I've been scratching my head at the ASP.NET 2.0 TreeView control.  This control is meant to show a tree of items and each item can have a link to it.  For example, this is what I use for my menu on the left of the page. 

It works great, except I had a specific case where I wanted to use it.  I have a form for data entry where there is a hierarchy of items to select from.  The user picks an item from the tree view and I read the Path of the TreeView control and store it as the selected item.  This worked but everytime the user selected an item, I was getting a post-back to the server. It was as if   AutoPostback had been enabled.  But the TreeView control doesn’t have an AutoPostback property.  I noticed that if I set the node’s NavigateUrl property that clicking on a node didn’t call __DoPostBack, but instead called the URL I specified in the NavigateUrl property. So I decided to make the NavigateUrl property “javascript:void(0)”.  Essentially telling it that when the item is clicked, do nothing.

ASP.NET Web Application...Wahoo!

Url: http://webproject.scottgu.com/Default.aspx

Big thanks to Scott Guthrie in championing the Web Application for ASP.NET 2.0!  I love using the old ASP.NET model (instead of the ackward Web Site project). I have now completely converted to the new format and I am very happy with the way it worked in almost every way.

SqlDataSource Issues...

Url: http://wilderminds.blob.core.windows.net/downloads/datasourcesgone...

I've blogged before about issues with the SqlDataSource.  I've crufted up an example of the problems that can be downloaded here (with usual caveat of changing the connection string in the web.config to point to a DB with the Northwind database).

Fritz Onion says Essential ASP.NET 2.0 Is Almost Done!

Url: http://pluralsight.com/blogs/fritz/archive/2006...

On Fritz Onion's blog, he mentions that the manuscript for Essential ASP.NET 2.0 should be done by Monday.  I am itching to get a copy of that book when it comes out.

New Website Look

I've reworked my web site. It was looking a bit more like the uniform of a NASCAR driver than a web site, so I reworked the layout to make it cleaner. I admittedly stole many of my ideas from other web sites and templates I saw.

The other reason for the change was to eliminate ViewState.  I noticed my pages ballooning from the sheer size of the HTML that was being generated, much of it as ViewState.  I've eliminated ViewState in almost every case.  For example, the size of the HTML of my home page was reduced from 134K to 48K.  That's just HTML size, not images...so the real size change should be even more dramatic.

Cookies Ruined the Breadcrumbs...

Trish and I are moving soon.  She's been sending me links to rugs for our new living room floor. She found an interesting one today:

target web problem

Behind the Scenes at ADOGuy.com - Part 1

I recently was talking with a prominent developer in the Microsoft community as they were creating a new version of their website. They had used a code generator to create most of the code on the new site which I thought was cool, but I immediately wanted to know how much functionality was included. As I talk with other MVP's as well as Regional Directors, it seems that I am in the distinct minority.  wildermuth.com is written almsot completely as custom ASP.NET code. Sure I used some components and started with someone else's HTML template, but most of the code is still C# to do much of the heavy lifting. Most of the people I talk with use community use pre-packaged systems to host their sites (including Community Server, DASBlog, etc.). 

Why do I keep all that custom code?  Mostly to allow me to try out new web techniques.  I am facinated by CSS and like to learn how different sites do what they do. I also like to add new technologies as I can (e.g. Silverlight, LLBGenPro) as I learn them.

GridView, HyperLinkFIeld and FILE:// URLs

Url: http://lab.msdn.microsoft.com/productfeedback/v...

I was helping a friend out this evening trying to get a simple GridView working with a HyperLinkField from a database result and we ran into an interesting security feature that people might run into:

MetaBuilders ASP.NET Controls

Url: http://www.metabuilders.com

I just wanted to give a shout out to Andy Smith of MetaBuilders ASP.NET controls.  I regularly use his DialogWindow and FirstFocus controls.  He has a number of controls on his site that are just great, but I can only speak for those two.  My $0.02 review of them are:

Three Tier ASP.NET Apps

I hear from a lot of readers that they are creating 3-tier ASP.NET apps and I always wonder if they know where the middle tier is.

In my opinion, the web server is the middle tier and client tier is the browser. Creating another set of machines to host the data layer isn't really necessary and, in fact, hosting the data layer on the web server is easier to scale. We know how to scale out web servers. Inventing a new set of machines forces you to figure out how to scale them out and it does not increase your scalability by scaling out both the web server and a fourth tier.

Nasty ASP.NET 2.0 Bug...Postponed?

Url: http://lab.msdn.microsoft.com/productfeedback/v...

I've been working on some ASP.NET 2.0 code for the last few weeks and ran into a bug that (in my opinion) is particularly nasty.  If you are comfortable with the 1.x model at all, you're likely to run into it.  In the 1.x model, all code-behind classes were compiled into a single assembly.  So you could:

How to share Forms Authentication between a 1.x Site and a 2.0 Site in the Same Domain

There are several blogs that have discussed how to share an auth cookie between sites in a farm and how to do a true single-signon for a domain. Mark Brooks pointed me to these that help a lot:

Now the trick is to do it between a 1.x and a 2.0 site in the same environment (but in different IIS Applications).  The trick is to create a <machineKey /> entry in both web.configs.  Pete Bromberg has a nifty little web page that will help you generate one to use for both:

Master-Detail in ASP.NET 2.0 is Pretty Cool

Re-writing ADOGuy.com for ASP.NET 2.0

Back in the day when ASP.NET shipped, I converted this site from the existing ASP based site.  As an exercise to really bring in some new features I've wanted and to lose the ASP legacy (I actually still have a page or two that uses string concatenation to put together HTML Tables), I want to do a full re-write of the site. 

I use a process where I begin with the requirements, then the data, then the code (no big surprises there).  My goal is to blog through each stage of this process and hopefully help my readers learn a bit about an ASP.NET 1.x to ASP.NET 2.0 conversion.

Rewriting ADOGuy.com: Part 1 - Requirements

For the new wildermuth.com, I have the following requirements:

I am sure there  are more, but those are the core of the new requirements.  Tune in tomorrow to start matching requirements with solutions...

Problems Creating Custom DataSource Enabled Controls in ASP.NET 2.0

Url: http://lab.msdn.microsoft.com/productfeedback/v...

I find it unfortunatle that Microsoft has made is way too difficult to write your own DataSource enabled controls.  Deriving from DataBoundControl, but it still does not seem to be a way to synchronously get the data from the DataSource.  In a DataBoundControl control you can get the DataSourceView like so:

Web Application Project Preview from Scott Guthrie! (This is HUGE)

Url: http://webproject.scottgu.com/

This is freaking huge in my opinion.  It seems that all the fuss about how hard ASP.NET 2.0 has made it for many of us has gotten through to the team (yeah!).  You can download the Preview here:

Lesson for the Day: Don't use XP Home for Development

As some of you know I lost the screen on my main laptop (HP ZD8000, a lovely machine at 13 lbs) so I sent it into support where they are going to fix it but take 2 weeks to do it. I took over my old laptop from my dear Tricia to try and make it work for a while.

To simplify her world, the laptop only had XP Home on it.  After getting the 3,000 things installed I needed to in order to work on my current project I am going to have to upgrade it to Professional.  The problem?  ASP.NET 2.0.

Custom Profile Provider Code Up at TheServerSide.NET

Url: http://www.theserverside.net/articles/showartic...

TheServerSide.NET has finally put up the source code to my article.  If you need a searchable Profile Provider for ASP.NET 2.0...check it out.


Application Name WilderBlog Environment Name Production
Application Ver 1.1.0.0 Runtime Framework .NETCoreApp,Version=v1.1
App Path D:\home\site\wwwroot Runtime Version .NET Core 4.6.24628.01
Operating System Microsoft Windows 6.2.9200 Runtime Arch X86