retrieving values from list box then use this values to retrieve data from db to gridview

 help.. can anyone give me some idea or examples regarding this one... the select formula should be something like this.. but not totally like this..


Dim selectinfo = (from a in db.PRs _
where a.PRID = item[1] and a.PRID = item[2] and a.PRID = item[3] _
select a)

 

those item[1], item[2]....etc are the values inside the listbox...

 how will i apply that into the select command... using loop...

thank you in advance...
 


Regards,
Mhaey

Please remember to click “Mark as Answer” on the post that helps you.. =)
0
darkcat02
6/12/2008 6:24:25 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies
886 Views

Similar Articles

[PageSpeed] 18

string selectedItems = "";for (int vLoop = 0; vLoop < lstItems.Items.Count; vLoop++) 

{

if (lstItems.Items[vLoop].Selected == true)

selectedItems = lstItems.SelectedValue + ",";  // here i am binding selectedvalue. i felt that you must bind PRID as value filed to listitems

}

     select * from PRs where charindex(','+PRId+',',','+@PRValues) > 0

dataset ds =  // Run the above query and get the dataset, and assign that dataset as datasource to gridview and bind it.

geidview1.datasource = ds;

gridview1.databind();

 


Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
0
ramireddyindia
6/12/2008 10:40:40 AM
Reply:

Web resources about - retrieving values from list box then use this values to retrieve data from db to gridview - asp.net.presentation-controls

Mother of three killed landlord after he tried to stop her retrieving her son's shirt
A mother of three has been found guilty of killing her landlord after he tried to stop her retrieving a red polo shirt her son needed for school ...

Retrieving bodies a 'horrifying' experience (01:43)
Anti-jump measures on the Story Bridge should be "fast tracked" and water police funding increased so CityCats don't have to pick up bodies. ...

Man drowns retrieving toy boat
A man has drowned after entering the Wimmera River at Horsham to retrieve a remote-controlled boat.

Bishop says there is no time limit on retrieving MH17 remains
THE Australian Federal Police have warned that it is too dangerous to approach the MH17 crash site in war-torn eastern Ukraine until security ...

Search underway for man swept away in Brisbane River while retrieving toy boat
A search is underway for a man swept away in the Brisbane River while retrieving a toy boat.

DPRK blames US for suspension of retrieving American soldiers' remains
DPRK blames US for suspension of retrieving American soldiers' remains People's Daily Online PYONGYANG, Oct. 13 The Democratic People's Republic ...

Good dog: Yankee retrieving a big Canada in a Manitoba hayfield
Good dog: Yankee retrieving a big Canada in a Manitoba hayfield

iPhone dev: Retrieving user phone numbers
... a secret to recovering user phone numbers that does not involve the … One of the most common questions I get these days has to do with retrieving ...

Girl stuck in Dover storm drain retrieving phone
A teenage girl gets stuck in a storm drain in Dover while trying to retrieve her mobile phone which had fallen into it.

Forensic investigations: Retrieving data from the cloud
... ensure that nothing is missed in the evidence gathering process, and to ensure that the investigative team doesn’t run out of time when retrieving ...

Resources last updated: 12/10/2015 12:32:23 PM