如何在用户控件中刷新其父页面的内容

bakerk 2003-08-26 02:32:21
现在有一个登陆界面,做成了用户控件
对于访客和正式用户有不同的界面
现在用户登陆之后,主页面的结果还是对于访客的页面
需要在用户控件中,还是主页面中进行刷新处理
谢谢
...全文
50 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
saucer 2003-08-28
  • 打赏
  • 举报
回复
after the validation, set some shared information, for example, in a Session variable, so the main page will know the status of the login. But I still think my above suggestion is a better approach

also see
Building a custom ASP.NET login control
http://www.caparea.net/Downloads/109.aspx
bakerk 2003-08-28
  • 打赏
  • 举报
回复
can you say it more clearly?
Now I am using a login control and validate the user info within this control.
After the valid user login, I want to refresh the main page together with the login control.
But the problem lies in only the control reload itself and the main page retain its status.
So can you help me?
saucer 2003-08-28
  • 打赏
  • 举报
回复
you don't want to build a dependency between your 用户控件 and the container page, expose some properties and an event, so the container page can subcribe to your event and update its own interface
bakerk 2003-08-28
  • 打赏
  • 举报
回复
哪位高手救救我

62,075

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧