通过下拉列表记录问题的效果 [英] problem fectch teh record by the dropdownlist

查看:77
本文介绍了通过下拉列表记录问题的效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个下拉列表和一些texbox.我需要获取记录,并获取记录后,将其放置在文本框中,当我选择一个dropdoenlist时,值就来了,但随后选择了第二个dropdownlist,则第一个dropdownlist的值是clear,可以提供任何帮助,是什么问题,以及没有aoptopsotback yhis无法在以下文本框中设置记录,
谁能帮我..............
预先谢谢您

解决方案

 // 添加(" , dropdowlnist1.text);

// 在下拉列表中2_selectedindexchanged 
dropdownlist1.text =会话[" ].tostring();
会话.添加(" , dropdowlnist2.text);

// 在下拉列表中3_selectedindexchanged 
dropdownlist2.text =会话[" ].tostring();
会话.添加(" , dropdowlnist3.text);

// 在下拉列表中更改了4_selectedindex 
dropdownlist3.text =会话[" ].tostring(); 


如果您编写用于填充下拉列表的代码或页面加载中的任何代码
放入if(!page.ispostback0
{
您的代码在这里
}


Hi I Have 4 dropdownlist and some texbox. i need serch the record and after serching the record it shoul be place in textbox, when i select one dropdoenlist, value is come but afetr selction second dropdownlist, the value of first dropdownlist is clear , can any one help, what is problem, and without aoptopsotback yhis is unable to set the record n the following textbox,
Can any one help me..............
Thank You In advance

解决方案

//On dropdownlist1_selectedindexchanged

session.add("ddl1",dropdowlnist1.text);

//On dropdownlist2_selectedindexchanged
dropdownlist1.text= Session["ddl1"].tostring();
session.add("ddl2",dropdowlnist2.text);

//On dropdownlist3_selectedindexchanged
dropdownlist2.text= Session["ddl2"].tostring();
session.add("ddl3",dropdowlnist3.text);

//On dropdownlist4_selectedindexchanged
dropdownlist3.text= Session["ddl3"].tostring();


if u write code for filling dropdownlist or any code in page load
put it in if(!page.ispostback0
{
your code here
}


这篇关于通过下拉列表记录问题的效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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