PC Review


Reply
Thread Tools Rate Thread

aspnet & adonet question

 
 
MattB
Guest
Posts: n/a
 
      16th Mar 2004
In my asp.net (vb) application I'm displaying data from a table in a
dataset in a listbox. The data displays as I want using the .DataTextField
property, but when the user makes a selection I need to return more than one
value in a row. This is because the data has a compound key on three fields
(department, category, and item).
I tried setting the DataValueField to "department" & "category" & "item"
but that errored out because:
DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with
the name departmentcategoryitem

So I guess I need to figure out how to return the values of three fields OR
create a view that concatenates those fields into one that I could parse out
again later. BUT, I don't know how to create a view in this context
(ado.net/vb.net). Can someone tell me which way might work better (or at
all) and some tips on making it work? TIA!
--

Matt

"Gravity. It's not just a good idea, it's the law!"


 
Reply With Quote
 
 
 
 
MattB
Guest
Posts: n/a
 
      16th Mar 2004
In answer to my own question, I'm just going to get the index of the select
item and then grab those values from the dataset table using the index and
col names. If there's a much easier way LMK, but this shouldn't be too hard!

MattB wrote:
> In my asp.net (vb) application I'm displaying data from a table
> in a dataset in a listbox. The data displays as I want using the
> .DataTextField property, but when the user makes a selection I need
> to return more than one value in a row. This is because the data has
> a compound key on three fields (department, category, and item).
> I tried setting the DataValueField to "department" & "category" &
> "item" but that errored out because:
> DataBinder.Eval: 'System.Data.DataRowView' does not contain a
> property with the name departmentcategoryitem
>
> So I guess I need to figure out how to return the values of three
> fields OR create a view that concatenates those fields into one that
> I could parse out again later. BUT, I don't know how to create a view
> in this context (ado.net/vb.net). Can someone tell me which way might
> work better (or at all) and some tips on making it work? TIA!




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about aspnet 3.5 and IIS 5.1 Bob Microsoft ASP .NET 2 17th Nov 2007 01:56 PM
ASPNet 2.0 Cache question Jason Huang Microsoft ASP .NET 4 27th Sep 2007 03:44 PM
ASPNET 2.0 Page_Load question Jason Huang Microsoft ASP .NET 5 23rd Sep 2007 10:50 PM
Caching question ASPNET and C# =?Utf-8?B?U2FsdmFkb3I=?= Microsoft ASP .NET 1 23rd Jun 2005 10:56 PM
vb -> vb.net ASPNet Date question Microsoft ASP .NET 1 2nd Jun 2004 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:34 PM.