Session DropDownList显示值 [英] Session DropDownList to display Values

查看:68
本文介绍了Session DropDownList显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试将用户从下拉列表中选择的值进行会话,以显示在另一页的标签字段中。



但是,我只是管理会话表中值的ID。我想要显示的值而不是它所代表的ID。



我知道如何更改它以显示值而不是ID?



这是我的代码片段,用户在SelectedIndexChanged方法下从2 DropDownList中选择:



Hello, I am trying to session the values that a user select from a dropdownlist to be displayed on a label field in another page.

However, i only manage to session the ID of the value in the table. I want the value to appear instead of the ID that it represents.

Any idea how i can change it to show the value instead of the ID?

This is a snippet of my code where user selects from 2 DropDownList under the SelectedIndexChanged method:

int ddvalue = Convert.ToInt32(DropDownList1.SelectedItem.Value);
int ddvalue1 = Convert.ToInt32(DropDownList2.SelectedItem.Value);
           if (ddvalue == 1 && ddvalue1 == 1)
           {
               Label6.Text = "$500";
           }





上面的代码只允许我查询值的ID。我如何从下拉列表中汇总值?



我们将非常感谢任何帮助!



the code above only allows me to session the ID of the value. How can i session the value from the dropdownlist instead?

Any help will be greatly appreciated!

推荐答案

500;
}
500"; }





上面的代码只允许我会话ID我怎样才能从下拉列表中汇总价值?



我们将非常感谢任何帮助!



the code above only allows me to session the ID of the value. How can i session the value from the dropdownlist instead?

Any help will be greatly appreciated!


这篇关于Session DropDownList显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆