更新时间:2022-10-16 15:17:54
在你的代码中尝试这个...将所有控件放在ContentTemplate中,这些控件正在调用事件并将它们注册到triger中< asp:ScriptManager ID = ScriptManager1 runat = server >
< / asp:ScriptManager >
< asp:UpdatePanel ID = UpdatePanel1 runat = server >
< ContentTemplate >
< asp:按钮 runat = 服务器 ID = update_Button 文本 = 生成随机数 宽度 = 187px
OnClick = update_Button_Click / >
< pre > < / ContentTemplate >
< ; / asp:UpdatePanel > n>
< 触发器 >
< asp:AsyncPostBackTrigger ControlID = update_Button EventName = 点击 / >
< / Triggers > 跨度>
hi,
im doing a kind of online shopping project like amazon. when i click a slideshow image button the,whole page has reloads.how to solve this kind of problem.
thanks,
Try this in your code...place you all the control inside the ContentTemplate which are invoking the event and register them into the triger<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Button runat="server" ID="update_Button" Text="Generate Random Number" Width="187px" OnClick="update_Button_Click" /> <pre></ContentTemplate> </asp:UpdatePanel> <Triggers> <asp:AsyncPostBackTrigger ControlID="update_Button" EventName="Click" /> </Triggers>