asp.net,按钮问题 [英] asp.net, problem with button

查看:65
本文介绍了asp.net,按钮问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个Web应用程序上工作,该Web应用程序有2页
在第1页

我有一个按钮..当我按下此按钮时,我想要那个按钮

第2页上的标签...更改其文本.

我该怎么做.. plx的帮助!

我相信他希望在一个选项卡中打开的页面能够影响在另一个选项卡中打开的页面中的控件.

workng on a web application, which hav 2 pages
at PAGE 1

i have a button .. i want that when i clik this button

a label which is at PAGE 2... chnge its text.

how can i do this .. plx help!

I believe he wants a page opened in one tab to be able to affect a control in a page opened in another tab.

推荐答案

In general, this doesn't make sense.

When your second page is executing, the first page is gone. It simply no longer exists. There is no label for you to assign to.

Even if you could assign to the label, the previous request is over. The HTML (without the change) has already been sent to the user's browser.



一种可能是,您可以使用类似问题的查询字符串(或其他用于将数据从page1发送到page2的状态管理概念)重定向页面并将其分配给标签.



one posssibility is you can use querystring like thing (or other state management concepts for sending data from page1 to page2)redirect the page and assign it to label.


Well if this what u mean the two pages will be open u can make session and u can make timer to check about the value of session if it have value you can change the text of label .



最好的问候
M.Mitwalli



Best Regards
M.Mitwalli


HI

您可以很好地使用它,但是如果您不希望任何回发使用.

ICALLBACKHANDLER


它将帮助您无需将值回发给后分配,因为它是从服务器端调用的

请参阅

http://www.ajaxmatters.com/2006/05/using-icallbackeventhandler-in -asp-net/ [ ^ ]

http://msdn.microsoft.com/en-us/library/system. web.ui.icallbackeventhandler.aspx [ ^ ]


希望对您有帮助

谢谢
HI

You can surly use this but if you don''t want any post back use.

ICALLBACKHANDLER


It will help you with out post back assignment to the values because it calls from the serverside

refer

http://www.ajaxmatters.com/2006/05/using-icallbackeventhandler-in-asp-net/[^]

http://msdn.microsoft.com/en-us/library/system.web.ui.icallbackeventhandler.aspx[^]


Hope it will help You

Thanks


这篇关于asp.net,按钮问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆