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

Posts: 59
Location: North Borneo.
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:Inetpubwwwrootmygdileft_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
 
When You Register, These Ads Go Away!
Old 03-20-2006, 11:05 PM Still Is this asp.net code right?
waller's Avatar
Skilled Talker

Posts: 59
Location: North Borneo.
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, 04:12 AM Re: Is this asp.net code right?
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
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!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Reply     « Reply to Is this asp.net code right?
 

Thread Tools

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

vB 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.13172 seconds with 12 queries