在母板页"CS"加入:
public HyperLink MasterPageHyperLink3
{
get
{
return HyperLink3;
}
set
{
HyperLink3 = value;
}
}
{
get
{
return HyperLink3;
}
set
{
HyperLink3 = value;
}
}
在子页"源"加入:
<%@ MasterType VirtualPath="~/xoyozo/xoyozo.master" %>
即可在子页重写它:
Master.MasterPageHyperLink3.NavigateUrl = "ddddddd.html";
但最好放在Page_LoadComplete:
protected void Page_LoadComplete(object sender, EventArgs e)
{
}
{
}
xoyozo
17 年前
3,298
IEnumerator SessionEnum = Session.Keys.GetEnumerator(); while (SessionEnum.MoveNext()) { Label1.Text += Session[SessionEnum.Current.ToString()].ToString() + " "; }
xoyozo
17 年前
5,312
public static bool loadRss(string RssUrl, int RssCount) { bool ok = true; XmlDocument doc = new XmlDocument(); if (RssUrl != "") { try { doc.Load(RssUrl); XmlNodeList nodelist = doc.GetElementsByTagName("item"); XmlNodeList objItems1; int i = 0; int count = 0; if (doc.HasChildNodes) { foreach (XmlNode node in nodelist) { string title = ""; string link = ""; string description = ""; string pubDate = ""; i += 1; if (node.HasChildNodes) { objItems1 = node.ChildNodes; foreach (XmlNode node1 in objItems1) { switch (node1.Name) { case "title": title = node1.InnerText; break; case "link": link = node1.InnerText; break; case "description": description = node1.InnerText; break; case "pubDate": pubDate = node1.InnerText; break; default: break; } } } if (i > RssCount) { break; } } } } catch (Exception ex) { ok = false; } } return ok; }
xoyozo
17 年前
4,308