Register   |   Login

 

Spark Your Solution

 Scott's Technology Blog Minimize

Author: Scott Davis Created: 3/2/2008 4:22 PM
My Blog

By Scott Davis on 4/2/2008 10:38 PM

While doing a little Ajax web programming, I hit this javascript error that stumped me longer than I care to admit.  Unfortunately the javascript error doesn't tell you which dropdown has the multiple selection, so not a trivial one to debug if you have several controls in the mix.

Error:  "Sys.WebForms.PageRequestManagerServerErrorException: Cannot have multiple items selected in a DropDownList."
 
I was changing the selected values based on other activity in the form.  Because I was using AJAX (which uses Javascript to do the magic), not your typically web request that would re-populating the drop down list all over again on the server side, I was causing the error by using the code below.  Note: the drop down list remembered the selected item from the last web request.  Setting the selected property of one item, doesn't clear the other selected flags.

foreach (ListItem ... Read More »

By Scott Davis on 3/18/2008 10:46 PM

On and off over the past few weeks I've been experiencing the hard knocks of using ASP.Net 2.0 profiles.  The most important lesson learned was this:  ProfileCommon is only available if you created your project as a "Web Site" not if you use a "Web Application".  Much to my disappointment, I reviewed many Microsoft articles and MVP blogs the talked of the many benefits of the ProfileCommon class, all failing to mention that you must use a Web Site project.

This is a nice little post that I finally found.

Read More »

By Scott Davis on 3/2/2008 4:55 PM

Last week I was working for a client, designing a SQL Server 2005 database.  I prefer to do my design, building the actual tables in SQL Management Studio.  I know some purest frown on this as not truly a design phase, but rather implementing as you go.  However, in my opinion, it is just as much effort to build a data model in a modeling tool (or Visio) as it is to build the real thing.  By doing it right in SQL Server, I can always get a diagram out later and don't lose any cycles I would otherwise lose by first designing and then later implementing the same thing.

So anyway, I've got my data model, now I need to write a nice design document for my client.  I started by writing a SQL query to extract the basic column data from the database.  In a few minutes I put this together.

select t.name, c.name, typ.name, c.length
from syscolumns c, sysobjects t, systypes typ ... Read More »

By Scott Davis on 3/2/2008 4:28 PM

So... I've got a blog, now what?  Well, if nothing else, this will be a place for me to catalog the things I learn, the issues I solve as I go, and the resources I find.  If someone else should happen to find value in these postings, all the better.  Here's hoping that this blog becomes well used.

 Print   
 Blog Dates Minimize

 Print   
 Search Minimize

 Print