Posts Tagged ‘objectdatasource’
I ran into an interesting “problem” last week that wasn’t all that hard to figure out once I broke out the debugger. But I thought it would be useful to share the results to save others the time.
The situation was that I had an Object Data Source in a FormView that I wanted to share with both a DataGrid in the FormView and a DataRepeater outside of the FormView. Since it was in the FormView, the DataRepeater couldn’t see it.
So it seemed reasonable to me that if I could just trap the right event in the FormView I could assign the DataSource of the GridView to the DataSource of the Repeater, rebind the Repeater and we’d be on our way.
It wasn’t quite that simple.
Republished by Blog Post Promoter
There are cases where it is advantageous to have a separate sql login for each user login who will be editing your database. If you are using Windows authentication, this is not a problem because you can pass the windows authentication tokens on through to the db without having to do a whole lot of work.
But, what about times where setting up a separate windows user for each person who will be accessing the system is more work than it’s worth, or as is the case in shared hosting plans, just isn’t practical?
Last Friday I showed how to use DataSet, the ObjectDataSource and select statements. Today, I’ll start with the project we ended up with last week and convert it to use stored procedures instead and I won’t write any code. That is, only the DataSet is going to change. The rest of my code will stay exactly the same as it was when we started.
As I’ve mentioned in other post, while I think LINQ has it’s uses, I still favor the use of the ObjectDataSource control in conjunction with DataSets and a 3-tiered architecture. Since any future demos I do will probably involve this architecture, I thought it would be useful to do a short demo that demonstrates how to create a 3-Tiered architecture in ASP.NET.