Click here to Skip to main content
16,012,352 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: regex to strip HTML comments Pin
Jeremy Falcon26-Jun-02 7:47
professionalJeremy Falcon26-Jun-02 7:47 
GeneralRe: regex to strip HTML comments Pin
alex.barylski26-Jun-02 12:17
alex.barylski26-Jun-02 12:17 
GeneralRe: regex to strip HTML comments Pin
Jeremy Falcon27-Jun-02 3:49
professionalJeremy Falcon27-Jun-02 3:49 
GeneralRe: regex to strip HTML comments Pin
alex.barylski27-Jun-02 18:06
alex.barylski27-Jun-02 18:06 
GeneralTimeZone Pin
Chris Melinn25-Jun-02 13:45
Chris Melinn25-Jun-02 13:45 
GeneralRe: TimeZone Pin
Chris Rickard25-Jun-02 14:52
Chris Rickard25-Jun-02 14:52 
GeneralRe: TimeZone Pin
Chris Melinn26-Jun-02 8:34
Chris Melinn26-Jun-02 8:34 
GeneralMaster/Detail view help needed Pin
ElCortez25-Jun-02 10:54
ElCortez25-Jun-02 10:54 
I found this code at msdn site explaining how to make a master/detail view:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam02052002.asp

The code is listed below.

musicLibrary.xml
<Artists>
<Artist name="The Chipmunks">
<CD id="4550" name="Eponymous" image="Eponymous.jpg" />
<CD id="4557" name="Hibernation" image="Hibernation.jpg" />
<CD id="4577" name="Going Nuts" image="GoingNuts.jpg" />
</Artist>
<Artist name="The Dogs">
<CD id="4640" name="Full Moon" image="FullMoon.jpg" />
<CD id="4637" name="Old Shoes" image="OldShoes.jpg" />
<CD id="4664" name="My House" image="MyHouse.jpg" />
</Artist>
</Artists>

music.aspx
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>

<html>
<script language="VB" runat="server">
Dim DS As Dataset = New DataSet

Sub Page_Load(Src As Object, E As EventArgs)

DS.ReadXml(Server.MapPath("musicLibrary.xml"))

Dim CSource As DataView
CSource = DS.Tables("Artist").defaultView
MusicList.DataSource = CSource

'a little code to help display what table relations exist
RelationsGrid.DataSource=DS.Relations

DataBind()

End Sub
</script>

<body>

<ASP:Repeater id="MusicList" runat="server">
<ItemTemplate name="ArtistTemplate">
<br /><br /><b><%# Container.DataItem("name") %></b><br />

<ASP:Repeater id="CDList" runat=server
datasource='<%# Container.DataItem.CreateChildView("Artist_CD")%>'>
<ItemTemplate name="CDTemplate">
<img src="<%# Container.DataItem("image") %>"align="absmiddle"/>
<%# Container.DataItem("name") %><br />
</ItemTemplate>
</ASP:Repeater>

</ItemTemplate>

</ASP:Repeater>

<br /><br />
<ASP:DataGrid id="RelationsGrid" runat="server"
Width="300"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
MaintainState="false"
/>

</body>
</html>

My problem is that it uses an xml file as a datasource.
Where i want to use two related tables from a database, but i can't seem to figure out how to do that.

I have created a dataset containing the two tables, I have also created a datarelation between the two tables.
I am able to write out the master table if i remove the nested repeater control.

If anyone is able to solve this problem i think a lot of people would be grateful. as i've seen questions
about this master detail thing around the net.




Venlig hilsen / Regards

Steffen Otto Jensen
(Denmark)
GeneralUser Control Specific Configs Pin
MStanbrook25-Jun-02 8:28
MStanbrook25-Jun-02 8:28 
GeneralRe: User Control Specific Configs Pin
Chris Rickard25-Jun-02 14:57
Chris Rickard25-Jun-02 14:57 
GeneralRe: User Control Specific Configs Pin
MStanbrook26-Jun-02 12:26
MStanbrook26-Jun-02 12:26 
GeneralRe: User Control Specific Configs Pin
Chris Rickard26-Jun-02 12:28
Chris Rickard26-Jun-02 12:28 
GeneralDisplaying ActiveX in Netscape Pin
Philip Patrick24-Jun-02 10:27
professionalPhilip Patrick24-Jun-02 10:27 
GeneralRe: Displaying ActiveX in Netscape Pin
Jeremy Falcon27-Jun-02 5:14
professionalJeremy Falcon27-Jun-02 5:14 
GeneralRe: Displaying ActiveX in Netscape Pin
Philip Patrick27-Jun-02 6:15
professionalPhilip Patrick27-Jun-02 6:15 
GeneralRe: Displaying ActiveX in Netscape Pin
Jeremy Falcon27-Jun-02 7:37
professionalJeremy Falcon27-Jun-02 7:37 
QuestionHow to set focus? Pin
Marc Clifton24-Jun-02 7:53
mvaMarc Clifton24-Jun-02 7:53 
AnswerRe: How to set focus? Pin
Philip Patrick24-Jun-02 10:26
professionalPhilip Patrick24-Jun-02 10:26 
QuestionString conversions in asp code??? Pin
CherezZaboro24-Jun-02 7:01
CherezZaboro24-Jun-02 7:01 
AnswerRe: String conversions in asp code??? Pin
Chris Rickard24-Jun-02 7:07
Chris Rickard24-Jun-02 7:07 
GeneralRe: String conversions in asp code??? Pin
CherezZaboro25-Jun-02 6:33
CherezZaboro25-Jun-02 6:33 
GeneralRe: String conversions in asp code??? Pin
Chris Rickard25-Jun-02 6:48
Chris Rickard25-Jun-02 6:48 
Generala question aboub IIS! Pin
24-Jun-02 3:01
suss24-Jun-02 3:01 
GeneralRe: a question aboub IIS! Pin
Chris Rickard24-Jun-02 5:26
Chris Rickard24-Jun-02 5:26 
GeneralTreeView control Pin
23-Jun-02 18:15
suss23-Jun-02 18:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.