Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Mobile > selectionList and datareader problem - Please Help!!

Reply
Thread Tools

selectionList and datareader problem - Please Help!!

 
 
domchik
Guest
Posts: n/a
 
      09-02-2003
I have a selectionList control bounded to a DataReader on a mobile
form like this :


cboStreetsSpecific.DataSource = drStreets;
cboStreetsSpecific.DataTextField ="StreetName";
cboStreetsSpecific.DataValueField ="StreetID";
cboStreetsSpecific.DataBind();




When I press a Command button and do Postback , I would like to
retrieve the selected item's text and value. I've tried to do it
inside Command_onClick event like this

private void cmdContinue_Click(object sender, System.EventArgs e)
{

string str= cboStreetsSpecific.Items[cboStreetsSpecific.SelectedIndex].Value);
}

or like this :

private void cmdContinue_Click(object sender, System.EventArgs e)
{

string str= cboStreetsSpecific.Selection.Value;
}


but it doesn't work. I also tried to retrieve it through Request
object like this :

string str= request.form["cboStreetsSpecific"].ToString();



and it doesn't work either .

When I do the same actions when the selectionList filled without
DataReader all the above attempts to retrieve the selected value DO
WORK !

Please , tell me how can I get the selected value when the
selectionList is bounded to datareader .

Thanks a lot in advance !!
 
Reply With Quote
 
 
 
Reply

Thread Tools

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
SelectionList Control Kenny ASP .Net 0 12-01-2003 02:17 PM
SelectionList problem leezard ASP .Net Mobile 1 08-21-2003 10:59 AM
SelectionList Problem Sanjay Sood ASP .Net Mobile 1 08-12-2003 02:00 AM
Databound SelectionList Problem Ran ASP .Net Mobile 0 08-11-2003 10:38 PM
SelectionList DataValueField problem Brad Wist ASP .Net Mobile 0 07-30-2003 08:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57