Onupdating linqdatasource

Could it be that you need to use an entity Data Source?

One of the most common tasks Web developers face is working with data.

I also have to do a full page refresh to update the gridview.

[edit] I had originally tried to use an object datasource and it behaved exactly the way your linq Data Source is.

And not only is writing tedious code uninteresting and boring, but it's also a recipe for bugs.

If you find yourself cutting and pasting code you might forget to change a table or column name in the SQL syntax of the pasted code, or you might forget that for the pasted code you need to handle NULL data differently than before. NET 2.0 introduces a new class of server controls—the data source controls.

The Updates are working great, but now I have to do a full page reload to get the new information to display in the Grid View.

NET 2.0, has a Data Source ID property, which you can set to the ID of the data source control whose data you want to display.

These controls encapsulate data from varying data stores and can be configured entirely using a declarative syntax, meaning that to access data in ASP. (Of course you can still access and modify data stores programmatically with ASP. NET 1.x.) The main data source controls that you'll find yourself working with in conjunction with the Grid View are: In a moment we'll look at using these Data Sources to access data.

But before we do, realize that when displaying data on a Web page, accessing the data is only one part of the puzzle. Next, you'll need to specify what data the Grid View should display.

If you haven't yet defined any connection strings, or don't see the one you want, you can create a new connection string by clicking the New button.

Figure 1 Once you have created or chosen an existing connection string, the next stage of the wizard prompts you to specify what data you are interested in working with (see Figure 2).

Leave a Reply