God eftermiddag Udviklere (-;
Jeg sidder med et problem, med hensyn til et cms system som jeg har hentet fra
http://www.basic-cms.com. Det virker fint nok, når man bare sætter det ind i sin ftp, - men når jeg forsøger at lave det med en masterpage viser den slet intet, tiltrods for at jeg har sat en default-side, under adminpanelet.
Her er koden til min masterpage:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>***</title>
<link href="includes/stylesheets/Default.css" type="text/css" rel="Stylesheet" />
<link rel="shortcut icon" href="gfx/images/icon.ico" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<div id="DefaultMainTop">
<div class="DefaultMainTop">
<div id="DefaultMainTopLogo"></div>
<div id="DefaultMainTopMenu">
<a href="Default.aspx">**</a> |
<a href="#">***</a> |
<a href="#">***</a> |
<a href="#">***</a> |
<a href="#">***</a> |
<a href="#">***t</a>
</div>
</div>
</div>
<div id="DefaultMainMiddle">
<div class="DefaultMainMiddle"></div>
</div>
<div id="DefaultMainContent">
<div class="DefaultMainContent">
<form id="form1" runat="server">
<div>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</div>
</div>
<div id="DefaultMainBottom">
<div class="DefaultMainBottom">***
<div class="rightBottom"><a href="#">Sitemap</a></div>
</div>
</div>
</body>
</html>
Og til min default.aspx side:
<%@ Page Title="" Debug="true" ValidateRequest="false" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ import Namespace="System.Data.OLEDB" %>
<script runat="server" language="vb">
dim mydata as string
Sub Page_Load(sender As Object, e As EventArgs)
Dim queryvalue = Request.QueryString("id")
If (IsNumeric(queryvalue)) then
Dim query As String = "Select pagedata FROM tblpages WHERE id = " & queryvalue & ";"
Dim myConn As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & dbsource & "")
Dim myCmd As OleDbCommand = New OleDbCommand(query, myConn)
myConn.Open()
Dim myReader As OleDbDataReader = myCmd.ExecuteReader()
While myReader.Read()
mydata = (myReader("pagedata").tostring)
End While
'close connections'
myReader.Close()
myConn.Close()
MyConn = Nothing
Else
Dim query As String = "Select pagedata FROM tblpages WHERE homepage = 1;"
Dim myConn As New OleDbConnection("PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" & dbsource & "")
Dim myCmd As OleDbCommand = New OleDbCommand(query, myConn)
myConn.Open()
Dim myReader As OleDbDataReader = myCmd.ExecuteReader()
While myReader.Read()
mydata = (myReader("pagedata").tostring)
End While
'close connections'
myReader.Close()
myConn.Close()
MyConn = Nothing
End if
End Sub
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<!-- #INCLUDE FILE="include.aspx" -->
<%=mydata%>
</asp:Content>
Burde den ikke vise, det som jeg har valgt som default?
Indlæg senest redigeret d. 17.03.2010 16:00 af Bruger #15759