ik heb succesvol een asp pagina kunnen omzetten naar asp.net. Ik heb echter het idee dat dit toch niet helemaal klopt. er moet namelijk een xml pagina uitkomen (alles gebeurd ook wel, maar toch)
zoals je kan lezen is dit eigenlijk nog asp3. ik heb echter geen id hoe ik DIT kan vertalen naar correct asp.net vb.net, kan iemand mij vertellen hoe het wel moet? of hoort het toevallig ook zo?
b.t.w. ik heb dit van microsoft`s MSDN af.
ASP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| <%@ Page aspcompat=true %> <%@Import Namespace="System.Data"%> <%@Import Namespace="System.Data.SqlClient"%> <% response.ContentType = "text/xml" Dim cnnSimple, rstCaths, strSQL, id cnnSimple = Server.CreateObject("ADODB.Connection") cnnSimple.Open("Provider=SQLOLEDB;Data Source=***;" _ & "Initial Catalog=***;User Id=***;Password=***;" _ & "Connect Timeout=15;Network Library=dbmssocn;") strSQL = "SELECT * FROM [Caths] ORDER BY [Cathegory_id] ASC, [Board_name] ASC;" rstCaths = cnnSimple.Execute(strSQL) %> <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="Default.xsl"?> <!DOCTYPE ACW SYSTEM "../Include/ACW.dtd"> <ACW> <cathegories> <% do while not rstCaths.EoF %> <cathegory id="<%= rstCaths.Fields("Cathegory_id").Value %>"> <cathegory_name><%= rstCaths.Fields("Cathegory_name").Value %></cathegory_name> <new_cathegory><% if Clng(rstCaths.Fields("Cathegory_id").Value) <> Clng(id) Then %>1<% else %>0<% End If id = Clng(rstCaths.Fields("Cathegory_id").Value) %></new_cathegory> <board_name><%= rstCaths.Fields("Board_name").Value %></board_name> <topics><%= rstCaths.Fields("Topics").Value %></topics> <board_id><%= rstCaths.Fields("Board_id").Value %></board_id> <moderator><%= rstCaths.Fields("NickName").Value %></moderator> <user_id><%= rstCaths.Fields("UserID").Value %></user_id> </cathegory> <% rstCaths.MoveNext Loop rstCaths = Nothing cnnSimple = Nothing %> </cathegories> </ACW> |
zoals je kan lezen is dit eigenlijk nog asp3. ik heb echter geen id hoe ik DIT kan vertalen naar correct asp.net vb.net, kan iemand mij vertellen hoe het wel moet? of hoort het toevallig ook zo?
b.t.w. ik heb dit van microsoft`s MSDN af.