ASP.NET 2.0 Presentation at Microsoft's Phoenix Location

On June 15th and 16th I had the opportunity to train 50+ people at Microsoft's Phoenix location on ASP.NET 2.0.  I met some great people and had a lot of fun showing many of the new features in V2.  The live samples I created during the presentation can be downloaded here. If you're going to run the samples make sure you update the connection strings located in the different web.config files (nearly all of the samples point to the standard Northwind sample database).

 

comments powered by Disqus

2 Comments

  • Dan,
    I was in your ASP.NET class last summer and I have a problem I can't solve. I have a web form where I used the wizards in Visual Studio 2005 to create a gridview that lists all those records that have a certain value in one of my database's columns, by way of a stored procedure using a simple SQL select statement. It works fine, but now I've added added a DropDownList control that I want to use to filter these same results according to the data in another column. (I built the list's array by hand.) I used the properties menu of the existing SqlDataSource control to set a filter parameter. I set the new parameter's source to "control" and selected the ID of my dropdownlist. My list's AutoPpostBack property is set to true, but when I use it to make a selection, nothing changes in the gridview's records display. Do I have to include an input parameter in my stored procedure? (I assumed I didn't, and that the parameter would just filter the existing dataset.)

  • I'd recommend actually handling the filtering in the stored procedure if you're able to since it'll minimize the number of records transferred from the DB to the page. But, going with the filter route should work as long as you're also setting the FilterExpression property. It matches up with parameters like your DropDownList parameter. More details can be found here in the MSDN library:

    ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref16/html/P_System_Web_UI_WebControls_SqlDataSource_FilterParameters.htm

Comments have been disabled for this content.