问题描述
亲爱的朋友,
我有一个下拉列表和一个gridview,
如果用户选择一个项目,则它将在GRIDVIEW中显示该特定项目的详细信息.
如果用户从下拉列表中选择一项,我想传递Querystring.
我的下拉列表中的项目列表为
-----选择------
按日期排序
按名称排序
按ID
排序
如果用户是从下拉列表中选择的...则此选定的特定项必须在BROWSER中以查询字符串的形式显示为details.aspx?selected =按日期排序
请帮助我,谢谢.
Dear Friends,
I have a dropdownlist and a gridview,
if user selects one item it is displaying that particular item details in GRIDVIEW.
I want to pass Querystring if the user selected one item from dropdownlist.
I have list of items in dropdownlist as
-----Select------
sort by date
sort by name
sort by id
if the user selected from dropdownlist... this particular selected item must show as query string in BROWSER as details.aspx?selected=sort by date
Please help me Thanks
推荐答案
Response.Redirect("Details.aspx?selected="+ddlId.SelectedItem.Value);
您需要为下拉列表设置AutoPostBack = true.
You need to set AutoPostBack = true for your drop down list.
这篇关于dropdownlist所选项目必须使用查询字符串显示在浏览器中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!