So, I’ve always incorrectly thought that somehow, the cookie stored in asp.net was somehow tied to the Session provider in asp.net. Turns out I’m wrong. This came up because I was discussing with another engineer whether we need to bother with a Session provider since we do not use Session in our web application. That is, we don’t ever store information by saying something like:
Session[“MyKey1”] = “MyShoppingCartInfo1”;
My assumption was that somehow, the Cookie planted on the client’s browser was in lock step with the IIS server through Session and that even if we did not store Session data, we still had to hook up a Session Provider. Wrong I am.
(more…)
The Problem
Over the past several years I’ve found myself running into the same problem over and over so I thought I’d blog the solution so at least I don’t waste time figuring it out again. So, when do you need this? The answer for me is that I want to be able reference a web site without having to expose the underlying site structure. For example, on the home page of my business, I want people to be able to type http://73rdstreet.com/Home and be taken to http://www.73rdstreet.com/HomeSite/Home.aspx.
The Symptom
You may see errors that say something like:
Server Error in Application … HTTP Error 404.0 – Not Found
(more…)
Article Series
The Problem
For the third year in a row, Silicon Valley’s Code Camp is happening. The way I’ve organized the data is that each year I make a fresh new sql server 2005 database catalog. this means that I have one for 2006, one for 2007 and a new one for 2008. I want to do a mailing to all people who have registered to previous code camps and who have not registered yet for this code camp. This way, I can do multiple mailings without worrying about sending to people that who have registered (which would make me look silly for not knowing they registered already). I do not like when people say things like "Ignore this message if you have registered…". In addition we will maintain an opt out list so that people who do not want additional emails sent can request that and not worry about us sending more emails.
(more…)
Article Series
Introduction
This article shows how to create a modal windows (not a popup) that displays a login windows (asking for username and password) in the middle of whatever asp.net page you are viewing. It uses the Telerik Modal Radwindow control. At the end of a successful login, the login dialog redirects the web user to some page designated by the author. It requires no Javascript programming by the programmer. Just simple method calls in the asp.net page.
(more…)
So, I guess I should have know the answer to why the following does not work. Basically, the scenario I have is that I have a foreign key column in my GridView that I want to show as a DropDownList of values. The code below shows me the values in the DropDownList, but when I update it with the “edit” of the GridView row, the value does not get saved. Here is the code and what it looks like running:
(more…)
Abstract
This article shows how to use Expression Builders in ASP.NET 2.0 to retrieve the current logged in user. DataBinding will not work so Expression Builders is the ticket. A small source file is created, the references to web.config are shown and a simple example is built.
The Problem
I recently was looking at unanswered posts in the asp.net forum, specifically this one: http://forums.asp.net/thread/1402259.aspx. I thought I
understood how databinding and expressions worked, but just wanted to check myself. So, I made a simple example
web page just like the post shows. (see below)
(more…)
Using Microsoft’s Visual Studio Design Templates
Author: Peter Kellner
Date: August 27th, 2006
Our Story
It’s Monday, August 21st, we have our CodeCamp scheduled for October 7th and 8th in Los Altos California and we realize we need to have our web site to sign up and running yesterday! For those of you who don’t know what a codecamp is, basically, it’s a developer to developer weekend meeting where high quality presentations are given to an audience of enthusiastic developers. Typically, 30 or 40 speakers running simultanious presentations to 300 or so attendees. Codecamps are all Volunteer, all free, and always on a weekend. So, our web site needs to allow sign ups for speakers and their presentations, attendess to let us know they are coming, provide information about the Venue as well as ultimately provide scheduling information about classes. Most importantly, it needs to do it with style and pizazz.
(more…)
Series Theme
This how-to series is my personal exploration into figuring out not just how to make things work, but how they actually work. The theme behind this series is: "If it’s not broken, take it apart and try and figure out why". I plan on covering many issues in ASP.NET 2.0. If you are interested in a particular part of ASP.NET 2.0 that I have not covered, please contact me and time permitting, I’ll see if I can figure out how it works.
Abstract
In this article, a simple asp.net 2.0 page will be taken apart and shown how the actual page class is put together. As we know, when an http request comes into asp.net through the http pipeline that is destined to be a page (file type aspx), the objective of asp.net 2.0 is to create a complete class that encapsulates that page request. That page class is an httpHandler of course.
(more…)