Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Key from listbox
Message
De
17/03/2003 11:10:38
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00766542
Message ID:
00766574
Vues:
24
I figured you had your DataSource, etc. already defined. But, glad you figured it out anyway. =)

~~Bonnie

>Thanks Bonnie. It was more then that.
>I needed the DataValueField defined earlier. I just saw pi_applpg becasue thre was nothing there.
>
>Session["dsGetModels"] = dsGetModels;
>MmDropDownList2.DataSource = dsGetModels;
>MmDropDownList2.DataTextField = "pi_model";
>MmDropDownList2.DataValueField = "pi_applpg";
>MmDropDownList2.DataBind() ;
>
>
>string ptPage = MmDropDownList2.SelectedItem.Value;
>string ptMake = MmDropDownList1.SelectedItem.Text ;
>string strURL = String.Concat("ptos.aspx?ptoapp=", ptPage ,"&ptoMake=", ptMake );
>Response.Redirect(strURL);
>
>
>
>
>>Hi Stephen,
>>
>>Use this:
>>
>>string ptPage = MmDropDownList2.SelectedValue.ToString() ;
>>
>>
>>~~Bonnie
>>
>>
>>>I have 2 columns in a list, Text for people to see and the key. How do I extract the KEY's value to pass to a new page? Below is what I'm trying'
>>>
>>>private void MmButton1_Click(object sender, System.EventArgs e)
>>>{
>>>string ptPage = MmDropDownList2.BindingSourceValueMember.ToString() ;
>>>string strURL = String.Concat("ptos.aspx?ptoapp=", ptPage );
>>>Response.Redirect(strURL);
>>>}
>>>
>>>In my address line I see :
>>>http://localhost/mmJumpStart/ptos.aspx?ptoapp=pi_applpg
>>>
>>>The pi_applpg is the column, not it's coresponding value.
>>>
>>>TIA
>>>
>>>__Stephen
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform