如果我现在是个超链接 但是我不想让他直接前台跳转页面 又想让他传值到后台进行判断以后再传值<area shape="poly" onfocus="this.blur()"
coords="986,270,900,375,926,393,943,399,975,407,1009,415,1045,418,1052,414,1095,440,1160,364,1161,361,1082,320" href="#" title="市一小"/>这href要写什么
还有 后台怎么接受到这个值 麻烦大侠们告诉下吧
coords="986,270,900,375,926,393,943,399,975,407,1009,415,1045,418,1052,414,1095,440,1160,364,1161,361,1082,320" href="#" title="市一小"/>这href要写什么
还有 后台怎么接受到这个值 麻烦大侠们告诉下吧
<asp:linkbutton id="box" runat="server" onclick="box_Click"></asp:linkbutton>
protected void box_Click(Object sender, System.EventArgs e)
{
if(条件)
{
box.NavigateUrl = "your url";
}
}
{
if(a==null)return;
var url="xxx.aspx?id=";
url+=encodeuri(a.coords);
window.top.location.href=url;
}
onclick="goit(this);"
试下,看成不成了!
k=1;1是你从数据库查出的
前台:<a href="default.aspx?id=<%=k%>"></a>
<area shape="poly" onfocus="this.blur()"
coords="986,270,900,375,926,393,943,399,975,407,1009,415,1045,418,1052,414,1095,440,1160,364,1161,361,1082,320" href="xxx.aspx?id=123" title="市一小"/>
另一个页面加载的时候接收id的值:
string id=Request.QueryString["id"];
int IntId = int.Parse(id);