Where are the error? [closed]

Alepdoolorp

New Member
this is the All.ascx page \[code\]<%@ Control Language="C#" AutoEventWireup="true" CodeFile="All.ascx.cs" Inherits="PageControls_All" %> <!-- ///////////////////////////////////////////////////////////////////// Verses --><asp:PlaceHolder ID="phModule" runat="server" ></asp:PlaceHolder><!-- ///////////////////////////////////////////////////////////////////// Draw No Bet --><asp:PlaceHolder ID="phModule8" runat="server" ></asp:PlaceHolder>\[/code\]And this is the All.ascx.cs page\[code\]protected void Page_Load(object sender, EventArgs e) {callXmlDrawNoBet();callXmlVersesScore();} private void callXmlDrawNoBet() { Control myUserControl8 = (Control)Page.LoadControl("~/PageControls/DrawNoBet.ascx"); XDocument xmldoc = XDocument.Load(Request.MapPath("~/Xml_Bet/FoothBall.xml")); if ((from node in xmldoc.Descendants("bettype").Attributes("name") where node.Value =http://stackoverflow.com/questions/10665900/="Draw No Bet" select node).Count() > 0) { phModule8.Visible = true; phModule8.Controls.Add(myUserControl8); } else { phModule8.Visible = false; phModule8.Controls.Remove(myUserControl8); } }private void callXmlVersesScore() { XDocument xmldoc = XDocument.Load(Request.MapPath("~/Xml_Bet/FoothBall.xml")); if ((from node in xmldoc.Descendants("bettype").Attributes("name") where node.Value =http://stackoverflow.com/questions/10665900/="Versus (with Draw)" select node).Count() > 0) { phModule.Visible = true; Control myUserControl = (Control)Page.LoadControl("~/PageControls/Verses.ascx"); phModule.Controls.Add(myUserControl); } else { Control myUserControl00 = (Control)Page.LoadControl("~/PageControls/empty.ascx"); phModule.Controls.Add(myUserControl00); phModule.Visible = false; } }and this is the foothball.xml <sport name="Football" sportid="3893"> <group name="Argentina - Primera Divison" groupid="12322"> <event name="All Boys v San Martin de San Juan" eventid="14625382" closetime="19/05/2012 21:10"> <bettype name="Versus (with Draw)" eventid="14625382" etid="10"> <bet outcome_name="All Boys" id="73041442" odd="2.00" status="Open" /> <bet outcome_name="X" id="73041443" odd="3.10" status="Open" /> <bet outcome_name="San Martin de San Juan" id="73041444" odd="3.75" status="Open" /> </bettype> </event> </sport>\[/code\]This is the problem when the page load must check the inside data of the xml and find the bettype name, if found its ok show it if not do not show it.but when the program checks and didn't find the excact bettype name in the page is showing all the tables and divs of the control but without values, i need if not found do not show even the table of the control.
 
Back
Top