MiunaYuki 2021-11-14 03:14 采纳率: 0%
浏览 9

请问为什么asp.net 上的imagebutton不能实现切换图片

后端这样打连图片也显示不出来,求解

if (DropDownList1.Text == "bilibili")
Response.Redirect("https://www.bilibili.com/%22);
ImageButton1.ImageUrl = "img/bilibili.jpg";
if (DropDownList1.Text == "爱奇艺")
Response.Redirect("https://www.iqiyi.com/%22);
ImageButton1.ImageUrl = "img/aqy.jpg";
if (DropDownList1.Text == "腾讯视频")
Response.Redirect("https://v.qq.com/%22);
ImageButton1.ImageUrl = "img/tx.jpg";
if (DropDownList1.Text == "优酷")
Response.Redirect("https://www.youku.com/%22);
ImageButton1.ImageUrl = "img/yk.jpg";
这是前端 如果在这个地方设置imageurl的话可以显示图片,但是我想要通过不同的选项显示不同的图片
<asp:DropDownList ID="DropDownList1" runat="server" Height="30px" Width="100px">
asp:ListItembilibili
asp:ListItem腾讯视频
asp:ListItem爱奇艺
asp:ListItem优酷

  • 写回答

2条回答 默认 最新

  • 技术专家团-极简 2021-11-14 07:27
    关注

    Response.Redirect是跳转,不能用这个。

    评论

报告相同问题?

问题事件

  • 创建了问题 11月14日

悬赏问题

  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 逻辑谓词和消解原理的运用
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝