Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
127 Points
143 Posts
Mar 18, 2012 10:06 AM|LINK
Hello
the page for game title information. There are many games and all game got eventid in xml.
<asp:DataList ID="DataList" runat="server" <ItemTemplate> <div><a href='Moreinfo.aspx?ProID=<%# XPath("event/@eventid") %>'>More </a></h3></div> </ItemTemplate> </asp:FormView>
This is the moreinfo.aspx page where it must show the more informations about the game depending on the id.
<asp:FormView ID="FormView_Moreinfo" runat="server" > <ItemTemplate> Event id: <div><h3 id="1"><%# XPath("event/@eventid") %></h3></div> </ItemTemplate> </asp:FormView>
and the behind code is
protected void Page_Load(object sender, EventArgs e) {
if (!Page.IsPostBack) { LoadXmlData(); } }
private void LoadXmlData() { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Server.MapPath("Xml_Bet") + @"\Testing.xml"); XmlNodeList nodes = xmlDoc.SelectNodes("Koorabet/sport/group"); XmlElement elem = xmlDoc.GetElementById("event/@eventid"); FormView_Moreinfo.DataSource = elem; FormView_Moreinfo.DataSource = nodes; FormView_Moreinfo.DataBind();
}
when i click on more button i'm not getting the moreinfo.aspx page with the id, please help, im confused.
Thanks
khayalian
Member
127 Points
143 Posts
open details.aspx by id in XML
Mar 18, 2012 10:06 AM|LINK
Hello
the page for game title information. There are many games and all game got eventid in xml.
<asp:DataList ID="DataList" runat="server"
<ItemTemplate>
<div><a href='Moreinfo.aspx?ProID=<%# XPath("event/@eventid") %>'>More </a></h3></div>
</ItemTemplate>
</asp:FormView>
This is the moreinfo.aspx page where it must show the more informations about the game depending on the id.
<asp:FormView ID="FormView_Moreinfo" runat="server" >
<ItemTemplate>
Event id:
<div><h3 id="1"><%# XPath("event/@eventid") %></h3></div>
</ItemTemplate>
</asp:FormView>
and the behind code is
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
LoadXmlData();
}
}
private void LoadXmlData()
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Server.MapPath("Xml_Bet") + @"\Testing.xml");
XmlNodeList nodes = xmlDoc.SelectNodes("Koorabet/sport/group");
XmlElement elem = xmlDoc.GetElementById("event/@eventid");
FormView_Moreinfo.DataSource = elem;
FormView_Moreinfo.DataSource = nodes;
FormView_Moreinfo.DataBind();
}
when i click on more button i'm not getting the moreinfo.aspx page with the id, please help, im confused.
Thanks