如何用hyperlink控件在点击打开一个新的窗口,同时将某个dropdownlist选中的值也一起传过去。或者有没有别的办法能不刷新页面来取得dropdownlist的值传到另外的一个界面上。谢谢了!问题解决马上给分
解决方案 »
- Access Insert 语法错误!!!!!!!!
- 新手请教,用visual studio 2005制作网页如何在页中放入flash?
- 怎样设置treeview某个节点的值
- 有关iframe的使用。简单问题,切盼赐教!
- datagrid实现分页后删除最后一页的所有记录出错
- 类里面提示"无法识别的转义字符?"
- 关于不同服务器文件上传的问题
- 怎样实现按价格查询?
- 插入到数据库的是乱码,不解,请教,谢谢
- 简单问题:超链接问题,在线等急.
- 论坛上点击引用后自动跳到页面底部的回复筐怎么实现?
- [quickstart]开发简单的自定义控件示例错误:找不到文件或程序集名称“SimpleControlSamples”,或找不到它的一个依赖项。
{
HyperLink1.NavigateUrl = "xxx.aspx?key=" + this.DropDownList1.SelectedItem.Value;
}private void DropDownList1_SelectedIndexChanged(object sender, System.EventArgs e)
{
HyperLink1.NavigateUrl = "xxx.aspx?key=" + this.DropDownList1.SelectedItem.Value;
}
前提是DropDownList1的AutoPostBack属性为true
<HEAD>
<script language='javascript'>
function changeImg(imgAdderss)
{
var item=document.all("imgForChange");
item.src=imgAdderss;
}
</script>
</HEAD>
<body>
<form runat=server>
<asp:DropDownList id="ddlStrage" runat="server" onChange="changeImg(ddlStrage.options[selectedIndex].value);"
Width="114px">
<asp:ListItem Value="7">7</asp:ListItem>
<asp:ListItem Value="5">5</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
</asp:DropDownList>
<IMG name="imgForChange" src="../images/btn_add.gif" border="0">
</form>
</body>
</HTML>
应该能找到你的答案.
<option Value="7">7</option>
<option Value="2">3</option>
<option Value="3">2</option>
<option Value="1">1</option>
</select>
<a href=# onclick="window.open('a.htm?id=' + document.all('ddlStrage').value ,'','');return(false);">打开窗口</a>