Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Key from listbox
Message
From
17/03/2003 11:10:38
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00766542
Message ID:
00766574
Views:
25
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
Previous
Reply
Map
View

Click here to load this message in the networking platform