Questions tagged [linqdatasource]

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

LinqDataSource is a Web Control which enables the use of Language-Integrated Query (LINQ) in an ASP.NET Web page through markup text to retrieve and modify data from a data object.

141 questions
1
vote
1 answer

Getting Xml Columns from LinqDataSource to appear in a GridView

I have a LinqDataSource and a GridView displaying a table. Columns of type xml don't show up. I'd like them to show up something like they do in Sql Server query outputs, with a link to display the clickable xml, though there may be another approach…
b w
  • 4,553
  • 4
  • 31
  • 36
1
vote
2 answers

LinqDataSource dynamic parameters - forcing an OR with WhereParameters

In my "selecting" statement I need to add two dynamic parameters when using the LinqDataSource's WhereParameters collection: e.WhereParameters.Add(param, True) However, the system adds these parameters as AND, but I want to perform an OR where…
Carl
  • 161
  • 1
  • 2
  • 5
1
vote
1 answer

LinqDataSource Result becoming Null before OnSelected was called

I'm assigning list to e.Result in LinqDataSource OnSelecting Event result contains 5 rows in it. On Execution of OnSelected Event the result doesn't contains any rows . Why is this happening ?... I'm I missing any thing? Here is my code of…
user3270152
  • 75
  • 2
  • 11
1
vote
1 answer

Where condition in LinqDataSource for string in ASP.NET

I am trying to populate data in gridview by using LinqDataSource and in the where condition of LinqDataSource1 - programmatically I am not sure about the syntax on how to pass a string value to a particular column? What is the syntax for where…
Nalini
  • 213
  • 1
  • 3
  • 12
1
vote
2 answers

Can't "Enable Editing" on my gridview

I'm trying to connect my gridview to a LinqDataSource to select, update, insert and delete records. I am able to get into edit mode and cancel out of edit mode but when I click update nothing happens. I've found a few things online that say to…
Abe Miessler
  • 82,532
  • 99
  • 305
  • 486
1
vote
1 answer

How do I get values from a LinqDataSource?

I have an .aspx page with several LinqDataSources. A LinqDataSource is bound to a GridView and/or WebDataGrid based on other controls on the page. The grid may be filtered, as well, which may show fewer results. The data sources are all bound…
Zairja
  • 1,441
  • 12
  • 31
1
vote
1 answer

ASP.Net: Sorting, GridView BoundColumn vs. TemplateColumn

With everything else being equal, a BoundField column in an asp:GridView is sortable, but a TemplateField column is not. Why is that?
cdonner
  • 37,019
  • 22
  • 105
  • 153
1
vote
1 answer

linqdatasource: Databind from another project

I have a solution "Foo" with 2 projects. "FooCore" and "FooWeb" where FooCore peoject contains the FooDatacontext in namespace Foo.FooCore.Core.Domain . How can bind the datacontext with linqdatasource in FooWeb project in aspx page. Is this…
littleBrain
  • 159
  • 4
  • 11
1
vote
1 answer

Return Modified Fields in LinqDataSource

I have a LinqDataSource like this one : How can I…
Tarik
  • 79,711
  • 83
  • 236
  • 349
1
vote
1 answer

datasources and Eval in a gridview

I have a gridview using a linqdatasource with a datamodelcontext that I've created. Why is it that I can do this:
Adam
  • 533
  • 4
  • 12
1
vote
1 answer

Setting where clause and parameters of linqdatasource like a Linq query

i have a listview and binding it in codebehind from a linq query that selects related Keywords MyDataContext dcxt = new MyDataContext(); string x = "searchword"; // i get x from user var query = from ak in dcxt.WordIndexes where ak.Word…
Emre
  • 563
  • 6
  • 18
1
vote
2 answers

Linq to SQL data source best practice

When using linq to SQL in my project I am currently creating the data context as late as possible in the code execution and disposing it as soon as possible. This results in the data context being open and closed many times on a page. Another option…
William
  • 41
  • 3
1
vote
1 answer

create a separated columns in asp.net c# using repeater or datalist using linqdatasource

I have created a database with table Category with categoryId,CategoryName, parentId and CategoryImage. I am using Linqconnect(LinqtoMySql). How could I display the categories and names using the Repeater or should I use datalist using linq…
Vishal Torne
  • 366
  • 5
  • 24
1
vote
2 answers

DropDownList value is blank when saving a FormView's filtered result

I have a FormView that is used for viewing, editing and inserting items into a MSSQL database. The FormView is wired up to a LinqDataSource, and I use its Selecting event to filter the data displayed in the FormView based on parameters (columns)…
Hoff
  • 1,762
  • 14
  • 27
1
vote
1 answer

Custom paging with gridview and linqdatasource

I have a problem which in theory should be very simple but i spent 3 hours now not being able to figure it out. I have a gridview and lingdatasource and i try to implement custom paging. No matter what i do i seem to be stuck with a pagesize of 25!…