Solved

VB - lable.text wont show?

Posted on 2014-01-30
8
224 Views
Last Modified: 2014-01-30
Hi ALL - For some reason the page wont show the lable.tex - its just blank here :

have i missed something out in the code?

Imports System.Net 
Imports System.IO 

Partial Class football_home
    Inherits System.Web.UI.Page

		Sub Page_Load(sender as Object, e as EventArgs)
		
			lblHTMLOutput.text = "heyho"

  End Sub
	
End Class

Open in new window

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="home.aspx.vb" Inherits="football_home" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
<h1>Screen Scrape </h1>
  <p>
  <asp:label id="lblHTMLOutput" runat="server" />
    </form>
</body>
</html>

Open in new window

0
Comment
Question by:runnerjp2005
8 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39820376
Other than the lowercase "t" at the start of "Text" it looks ok. If you put a break point at the start of the Page_Load method, does it get hit?
0
 

Author Comment

by:runnerjp2005
ID: 39820378
Yup seems all ok to me but here it shows nothing - http://jarrattperkins.com/football/home.aspx
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39820384
You are also missing a closing </p> tag - although I don't imagine that would be causing it not to display properly.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Author Comment

by:runnerjp2005
ID: 39820393
nope that didnt fix it...i just dont get it lol
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39820395
If you put a break point in the code and check the value of the Text property immediately after you set it, does it show empty, or does it show the correct value?
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39820402
you are missing the Handles part!

Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
0
 

Author Closing Comment

by:runnerjp2005
ID: 39820407
I cant believe i kept missing that!
0
 
LVL 40
ID: 39821644
Do not specify VB script when you ask a question dealing with .NET. They are very different things. This is like adding MS-DOS to a question about the new Windows 8 interface. Be more precise in what you are doing in .NET.

ASP.NET would have been a lot better choice, because it would have attracted more programmers who develop for the web.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script will sweep a range of IP addresses (class c only, 255.255.255.0) and report to a log the version of office installed. What it does: 1.)      Creates log file in the directory the script is run from (if it doesn't already exist) 2.)      Sweep…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question