Firstly : Thank You Very Much for your interesting .
I'm Explain My Problem in The Firstly :
create Menu in My web site this menuItem and submenu read from XMl file called (MenuRole.XML)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
all this item not apear for all user but some these apear depend on RoleID :
I'm Write This code to Read MenuItem and Sub Menu from DataBase and Convert To XML file to Compare with file (MenuRole.XML)
to apear in my menu for specifice RolID
/////////////////////////////// My Code ////////////////////////////////////////////////////////////////////
Session.Add("RoleID", DropDownList1.SelectedValue);
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["ACCITConnectionString"].ConnectionString;
string sql = "select Menu_Item_Name ,SubMenu , URl from MenuRole where Rule_Authentication_ID =" +Session["RoleID"] ;
con.Open();
SqlDataAdapter da = new SqlDataAdapter(sql, con);
DataSet ds = new DataSet();
da.Fill(ds);
ds.WriteXml(@"c:\Role.xml");
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////
and apear (Final.XML) but I want same format of ( MenuRole.XML) ]
But I want This OutPut and Format Created
//////////////////////////////////////////////// My Format ///////////////////////////////////////////////
<?xml version="1.0" encoding="utf-8" ?>
- <Menu>
- - <Intake>
- <DataBank>
<ExamType>ExamType.aspx</ExamType>
<ExamQuestions>ExamDatabank.aspx</ExamQuestions>
<SurveyType>SurveyType.aspx</SurveyType>
<SurveyTopic>SurveyTopic.aspx</SurveyTopic>
</DataBank>
- </Menu>
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
and the contian final.XML it's change depend on RoleID
This My Problem ........