Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
Is this asp.net code right?
Old 03-20-2006, 11:41 PM Is this asp.net code right?
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
Trades: 0
PHP Code:
Dim x As Label
x
.Text="HELLO" 
I put this code in default.aspx.vb code behind default.aspx.
Its a label in default.aspx.

I keep getting this error.
PHP Code:
System.NullReferenceExceptionObject reference not set to an instance of an object.

Stack Trace
[
NullReferenceExceptionObject reference not set to an instance of an object.]
   
mygdi.left_menu.Page_Load(Object senderEventArgs ein C:\Inetpub\wwwroot\mygdi\left_menu.aspx.vb:46
   System
.Web.UI.Control.OnLoad(EventArgs e) +67
   System
.Web.UI.Control.LoadRecursive() +35
   System
.Web.UI.Page.ProcessRequestMain() +750 
__________________
$id ="waxxer";
$id = str_replace('x', 'l', $id);
echo $id;
echo " and Marj";
waller is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-21-2006, 12:05 AM Still Is this asp.net code right?
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
Trades: 0
if I try putting
PHP Code:
x.Text="HELLO" 
inside the
PHP Code:
Private Sub btnLogin_Click(ByVal s As System.ObjectByVal e As System.EventArgsHandles btnLogin.Click 
It works just fine. The problem occurs when I put it inside
PHP Code:
Private Sub Page_Load(ByVal s As System.ObjectByVal e As System.EventArgsHandles MyBase.Load 
Any other way...???
I need to show it inside a page without having to click any button and stuff.
__________________
$id ="waxxer";
$id = str_replace('x', 'l', $id);
echo $id;
echo " and Marj";
waller is offline
Reply With Quote
View Public Profile
 
Old 03-21-2006, 05:12 AM Re: Is this asp.net code right?
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Trades: 0
Is the label defined in the .aspx file or are you trying to create it at runtime for some reason? Can you post your full code from the .aspx and the .vb files?
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to Is this asp.net code right?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59311 seconds with 12 queries