'm trying to create a compiled user control I can use
I've not got any useful code in at the moment it should just show "hello world"
This is hello.ascx page's code
Hello world
this is the .vb code
Which all compiles nicely but when I try to use it in my default.aspx page all I get is a blank page being loaded
here's default.aspx.vb
Can anyone tell me what stupid mistake I'm making this time or point me to some useful ultra-basic examples of how to do this that'd be lovely
Thanks
I've not got any useful code in at the moment it should just show "hello world"
This is hello.ascx page's code
Code:
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="hello.ascx.vb" Inherits="GControlNS.hello" ClassName="hello"%>
this is the .vb code
Code:
Namespace GControlNS
public Class hello
Inherits System.Web.UI.UserControl
End Class
End NameSpace
Code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
<%@Register Assembly="GControl" Namespace="GControl.GControlNS" TagPrefix="GControl1" %>
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head runat="server">
</head>
<body>
<GControl1:hello runat="server" />
</body>
</html>
Code:
Imports System.Windows.Forms
Imports GControl
Partial Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
End Class
Thanks