我是.net 的新手。我正在编写一个新应用程序,我必须在其中显示带有按钮控件的图像幻灯片。代码是
<div id = "slideshow" style = "width:auto" runat="server" align ="center">
<asp:Label ID = "slideHeader" runat="server" />
<asp:Image runat="server" ImageUrl=" " ID = "img" style="width:90%; height:100%;"/>
<hr style = "height:20px; border:0px; color:White" />
<asp:Button id="prev" Text="Previous" OnClick = "prevClick" runat="server"/>
<asp:Button id="next" Text="Next" OnClick = "nextClick" runat="server"/>
<asp:Button id="start" Text="Start" OnClick = "startClick" runat="server"/>
<asp:Button id="stop" Text="Stop" OnClick = "stopClick" runat="server"/>
</div>
按钮背后的代码是
protected void nextClick(object sender, EventArgs e)
{
img.ImageUrl = path;
}
我不知道如何为此使用更新面板。当我在 img 标签周围使用更新面板标签时,它显示更新面板没有属性 img。我怎样才能做到这一点?