本文介绍了访问母版页控件不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我使用母版页,因为有一个HyperLink.i设置了HyperLink NavigateUrl表格(母版页)的子页面。 我使用此代码在子页面中。I work with master page in that there are one HyperLink.i set that HyperLink NavigateUrl form (master page's) child page.for that i use this code in child page.HyperLink hl = (HyperLink)this.Master.FindControl("linkviewmysite"); hl.NavigateUrl = "../" + ds.Tables[0].Rows[0]["username"].ToString(); Response.Redirect("Siteadmindata.aspx", false); 这里linkviewmysite是母版页HyperLink的ID。 现在的问题是当我设置NavigateUrl它不起作用。 但什么时候从代码中删除这一行(Response.Redirect(Siteadmindata.aspx,false);)比使用导航设置和HyperLink对我来说工作正常。 所以现在应该用Response.Redirect做什么。here linkviewmysite is the id of master page's HyperLink.now problem is when i set NavigateUrl it's not work.But when is remove this line (Response.Redirect("Siteadmindata.aspx", false);) from code than navigateurl set and HyperLink is work fine for me.so now what should i do for it with Response.Redirect.推荐答案 这篇关于访问母版页控件不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!