在c#.ne开发中:
在1.aspx中有js:
<script>
function show_detail(thisID){
window.open("2.asp?id=" +thisID);
}
</script>
在1.aspx.cs中
lable1.Text = dd["id"].ToString();
this.lable1.Attributes.Add("onclick", "show_detail(this)"); 如何实现在1.aspx中 dd["id"].ToString()值传到2.asp。我这个始终不对?
在1.aspx中有js:
<script>
function show_detail(thisID){
window.open("2.asp?id=" +thisID);
}
</script>
在1.aspx.cs中
lable1.Text = dd["id"].ToString();
this.lable1.Attributes.Add("onclick", "show_detail(this)"); 如何实现在1.aspx中 dd["id"].ToString()值传到2.asp。我这个始终不对?
应该是这样吧 不行的话你再试试thisID其他的属性值
然后
window.location.href="2.asp?id="+thisID.value;
window.location.href="2.asp?id="+thisID;