Her det jeg prøver at lave
<%@ Register Tagprefix="UserControl" Tagname="SecurePage" Src="../../logout.ascx" %>
<%@ Import Namespace="System.data"%>
<%@ Import Namespace="System.xml"%>
<%@ Page Language="vb" Debug="true" %>
<script language="vb" runat="server">
Dim var as String
function Getpe()
return Repeater1.NodeList.Attributes("id")
end function
function ReadNodes()
Dim xmlfile as XmlDocument = New XmlDocument()
xmlfile.load(MapPath("materials.xml"))
Dim Nodelist as XmlNodeList = xmlfile.SelectNodes("list/group")
return Nodelist
end function
function ReadData(type as string) as System.Data.DataRow()
dim data as New System.Data.DataSet()
dim specifikfiles as System.Data.Datarow()
data.ReadXml(MapPath("materials.xml"))
specifikfiles = data.Tables(1).Select("type='" + type + "' and (owner = '" + Context.User.Identity.Name + "' or owner='general')")
return specifikfiles
end function
sub Page_Load
if Not Page.IsPostBack then
Repeater1.DataSource() = ReadNodes()
Repeater1.DataBind()
end if
end sub
</script>
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<link rel=Stylesheet type="text/css" media=all href="
http://www.3shape.com/CSS/Verdana.css"></head>
<body bgcolor="#F2F2F1" lang=DA link=black vlink=black style='tab-interval:
65.2pt' alink="#666666">
<p class="grundtekst10pt"><img src="../../../img/download_material_small.jpg" width="88" height="100"><strong><span
lang=EN-GB style='font-size:14.0pt;font-family:Verdana;mso-ansi-language:EN-GB'>
Materials</span></strong></p>
<form>
<asp:Repeater id="Repeater1" runat="server">
<ItemTemplate>
<p><Strong><%#Container.DataItem.Attributes("id").value%></Strong></p>
<%
Dim something as string
something = GetType()
Response.Write(something)
Response.Write( "<Strong>" )
Response.Write(something)
Response.Write( "</Strong>" )
%>
</ItemTemplate>
</asp:Repeater>
</form>
<p align="right">
<form runat="server">
<UserControl:Securepage runat="server" ></UserControl:Securepage>
</form>
</p>
</body>
</html>