rstrahl

Stories submitted by rstrahl

FormVarsToObject - a quick way to collect form input values(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 8 months ago

Here are a couple of small routines that let you quickly collect ASP.NET form variables into an object or a data row with a single line of code. This routine comes in handy in many situations where full databinding may not be involved or more commonly in AJAX scenarios where no form databinding can be applied on Page level callbacks. read more...

2 comments |category: |Views: 2

tags: another

LINQ to SQL and Serialization(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 8 months ago

LINQ to SQL provides entity objects that can be used easily for object access to data members. But these objects can be difficult to deal with if you need to serialize them in Web Services or in other ways because relationships are often circular. Here's a discussion of things to watch out for and how you can get around the issues. read more...

add a comment |category: |Views: 6

tags: another

Dynamic Type Invokation in .NET(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 8 months ago

There many ways to dynamically instantiating types in .NET and while it's not a common task when you need it you might find that there are a lot of different ways that you can instanatiate a type. Here's some discussion of different ways you can do it and a few helper functions to make life a bit easier. read more...

add a comment |category: |Views: 1

tags: another

Dynamic Expressions in Linq to Sql(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 8 months ago

Using LINQ there are two issues that I've been struggling with and both have to do with dynamic query results: Hitting the wall with SQL that can't be expressed via LINQ and using dynamic expressions inside of LINQ queries from within framework level code. As it turns out there are ways that this can be addressed with lower level LINQ methods that provide the abillty to be a bit more flexible in controlling what SQL gets executed and creating dynamic expressions for results. read more...

add a comment |category: |Views: 3

tags: another

LINQ To Sql - Getting a Command Object from a Query(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

LINQ to SQL is all about returning object from database queries, but sometimes it's actually useful to use good old DataReaders or DataTables - especially in ASP.NET applications that use DataBinding. Entities are objects and databinding requires Reflection which is very slow, compared to a DataReader. Luckily LINQ to SQL provides the abillity to retrieve a Sql Command object that can be used to return an alternate result set. read more...

add a comment |category: |Views: 13

tags: another

Creating a scrollable and grouped Repeater Layout(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

A couple of people asked me today about a layout I put together for an application. The layout is bascially a scrollable and grouped repeater that looks a little like a ListView control in WinForms. This sort of layout can be great for longer lists when paging is not really the right choice - a common scenario in AJAX applications actually. Here's a quick walk through on how this layout is put together. read more...

add a comment |category: |Views: 49

tags: another

GridView and Paging Alignment(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

The GridView's Pager row is a pain to get properly right aligned in a cross browser fashion. While the alignment settings that the control provides work in IE, they fail to properly right align in Firefox and a bit of work is required to get it to work right. read more...

add a comment |category: |Views: 102

tags: another

Open Folder in Windows Explorer in VS 2008(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

There's a silly little, but very useful addition on the project context menu in Visual Studio 2008 that lets you pop up Explorer in the project's folder easily. Sometimes it's a little thing that makes life a little easier. read more...

add a comment |category: |Views: 4

tags: another

Multiple Enumeration of LINQ results(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

LINQ result set enumeration can be a little unexpected if you don't pay close attention the returned Enumeration. Because of the way queries are enumerated at enumeration time, not when they are declared can easily result in multiple queries being run against the LINQ data or list source. read more...

add a comment |category: |Views: 17

tags: another

LINQ to SQL and Disconnected Entities Follow-up(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

Several people have been flogging me for my LINQ and disconnected Entity post, so I thought I should follow up on the issues I've been having. First let me restate Entity issue I raised a couple of days ago, but let me present it in a simpler context with the Northwind database, so you can try... read more...

add a comment |category: |Views: 6

tags: another

LINQ to SQL and Dynamic Queries and Expressions?(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

Continuing my experiments with LINQ in the middle tier I ran into another problem: Inability to make LINQ run any dynamic operations that are not defined explicitly in the LINQ to SQL import. For building a generic business framework that doesn't have concrete type references (to say a PK field) but dynamically needs to create SQL to query data. Even relatively simple things like retrieve a single record by primary key where primary key is dynamic not explicit is not easily accomplished without getting real low level into Lambda expression creation. read more...

add a comment |category: |Views: 28

tags: another

LINQ to SQL and attaching Entities(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

I have been experimenting with LINQ to SQL in the middle tier and have run into the apparently common issue of re-attaching entities to a DataContext in cross tier scenarios. Either the support re-attachment is not there or it is broken but either way it doesn't work which makes it pretty tough to use LINQ to SQL in the middle tier. read more...

add a comment |category: |Views: 12

tags: another

IIS/ASP.NET Settings and Virtual Directory Inheritance(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

Root directory web.config settings can easily interfere with child virtual application settings causing all sorts of problems. Here's why this is a problem and how to get around it. read more...

add a comment |category: |Views: 16

tags: another

XmlWriter and Schema Validation(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

Generating Xml on the fly from static text with an XmlWriter can be tricky. Here are a couple of pitfalls and a couple of workarounds along with one outstanding issue in schema interpretation. read more...

add a comment |category: |Views: 55

tags: another

Setting up and running Subversion and Tortoise SVN(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

A quick walkthrough of setting up and configuring SubVersion with Tortoise SVN and getting started creating repositories, adding files and folders, creating local copies and working with SVN. read more...

1 comment |category: |Views: 153

tags: another

ListView and DataPager in ASP.NET 3.5(west-wind.com)

submitted by rstrahlrstrahl(7226) 4 years, 9 months ago

Quick overview of the new ListView and DataPager controls in ASP.NET 3.5. See how they work for displaying and editing for data as well as using the DataPager for paging functionality. read more...

add a comment |category: |Views: 289

tags: another