怎么用后台代码设置ImageButton的postbackurl
protectedvoidImageButton1_Click(objectsender,ImageClickEventArgse){inty=e.Y;if(y>200)...
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
int y = e.Y;
if (y > 200)
{
ImageButton1.PostBackUrl = "http://www.sohu.com";
}
else
{
ImageButton1.PostBackUrl = "http://www.sina.com";
}
}
跳转不了。急 展开
{
int y = e.Y;
if (y > 200)
{
ImageButton1.PostBackUrl = "http://www.sohu.com";
}
else
{
ImageButton1.PostBackUrl = "http://www.sina.com";
}
}
跳转不了。急 展开
1个回答
展开全部
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
int y = e.Y;
if (y > 200)
{
Response.Redirect("http://www.sohu.com");
}
else
{
Response.Redirect("http://www.sina.com");
}
}
{
int y = e.Y;
if (y > 200)
{
Response.Redirect("http://www.sohu.com");
}
else
{
Response.Redirect("http://www.sina.com");
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询