sachtech boy
unread,May 7, 2012, 5:20:06 PM5/7/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hello Friends, I have two DropDownList: 1) CollegeDDL which contains Four static names of the colleges. : Homeopathic Medical College,Physiotherapy College,Institute of Ayurveda,Institute of Business Administration
2) CourseDDL which is bind to CourseDetail.XML.
<Institutes>
<Institute>
<InstituteName> Homoeopathic Medical College </InstituteName>
<Course> <CourseName> BHMS </CourseName> </Course>
<Course> <CourseName> MD(Repertary) </CourseName> </Course>
<Course> <CourseName> MD(Organon of Medicine) </CourseName> </Course>
<Course> <CourseName> MD(Materia Medica) </CourseName> </Course>
</Institute>
<Institute>
<InstituteName> Physiotherapy College </InstituteName>
<Course> <CourseName> BPT </CourseName> </Course>
<Course> <CourseName> BPT(Sports) </CourseName> </Course>
<Course> <CourseName> BPT(Cardio) </CourseName> </Course>
</Institute>
<Institute>
<InstituteName> Institute of Ayurved </InstituteName>
<Course> <CourseName> BAMS </CourseName> </Course>
<Course> <CourseName> BAMS(Nature) </CourseName> </Course>
<Course> <CourseName> BAMS(Plants) </CourseName> </Course>
</Institute>
<Institute>
<InstituteName> Institute of Business Administration </InstituteName>
<Course> <CourseName>BBA</CourseName> </Course>
<Course> <CourseName>DBM</CourseName> </Course>
<Course> <CourseName>BBA(Distance)</CourseName> </Course>
</Institute>
---------------------------------
CourseDetail.XSL
<xsl:template match ="/">
<Institute>
<xsl:apply-templates select ="Institutes/Institute/Course"/>
</Institute>
</xsl:template>
<xsl:template match ="Institutes/Institute/Course">
<Institute>
<xsl:attribute name="CourseName">
<xsl:value-of select="CourseName"/>
</xsl:attribute>
</Institute>
</xsl:template>
</xsl:stylesheet>
------------------------
I have bind Coursedetail.XML to CourseDDL and CourseDetail.XSL (No XPATH Expression)
After doing this, My CourseDDL is correctly filled with all the CourseName value of my XML file.
But now I want to filter the data bound to CourseDDL , based on College Name selected in CollegeDDL.
For Example:Currently my CourseDDL contains all the CourseName : BHMS,MD(Repertary),MD(Organon of Medicine),......,DBM,BBA(Distance).
But when I select "Homoeopathic Medical College" in CollegeDDL , The data bound to CourseDDL should filter accordingly.
It means when I select "Homoeopathic Medical College" , my CourseDDL should Display only that course: BHMS,MD(Repertary),MD(Organon of Medicine),MD(Materia Medica)
------------------------------------
I have tried the following , but could not achieve it.
1) XmlDataSourceCourse.XPath = "/Institutes/Institute[InstituteName='" + CollegeDDL.SelectedItem.Value + "']"
2) XmlDataSourceCourse.XPath = "/Institutes/Institute[InstituteName='" + ddlinstitute.SelectedItem.Value + "']/Course"
3)XmlDataSourceCourse.XPath = "/Institutes/Institute[InstituteName='" + ddlinstitute.SelectedItem.Value + "']/Course/CourseName"
Anybody please help to format correct XPATH Expression to achive this.