Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Side Code Does Not Work 2

Status
Not open for further replies.

louderthanu

Programmer
Jan 1, 2003
13
0
0
US
I am so frustrated!! I cannot get any of the .net code to run...

for instance

sub page_load()
response.write("hello world")
end sub

returns nothing... I can however put any asp controll EXCEPT a lable on the page, but only when it is written in the <body> of the page...

ie.
<script language=&quot;vb&quot; runat=&quot;server&quot;>
message.text = &quot;aggggh!&quot; />
<body>
<asp:label id=&quot;message&quot; runat=&quot;server&quot; />
<asp:dropdownlist id=&quot;dropdown&quot; runat=&quot;server&quot;>
<asp:listitem>This</asp:listitem>
<asp:listitem>Sucks</asp:listitem>
</asp:dropdownlist>
</body>

In this example, the dropdown list displays but not the lable tag.

If I set the &quot;text&quot; property for the tag in the tag it's self, it works...

that is
<asp:lable id=&quot;message&quot; text=&quot;I hate this!&quot; runat=&quot;server&quot; />
works!

Obviously, it's not running the server-side script...

I have run aspnet_regiss.exe and made sure that the aspnet_aspi.dll is properly registered as per the knowledge base articles.

I am experiencing this on three machines and it's making me crazy! Please help!!!

Thanks
Kevin Howell
Briefcase of Talent
Austin, Tx.

 
In your body code, I didn't see a form tag. Do you have one? I ran into errors when I accidentally deleted that once.

Just a thought!
Kimberly
 
louderthanu,

Out of curiosity I ran the following code on my box:

<script language=vb runat=server>

sub page_load()
response.write(&quot;hello world&quot;)
end sub

</script>

This was all that was in the .aspx file and it ran fine - &quot;hello world&quot; printed on the page. I hate to ask this, but have you re-booted the machines after registering the .dll? I know it sounds kinda silly but I know that I've made that mistake...

-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
This sounds like a problem I had running examples in a book that put all the script in the .aspx file rather than in the CodeBehind. The CodeBehind file generated by the ide had a Page_Load routine that had the parameter clause and &quot;Handles Page_Load ... &quot; etc. I just copied all that text and added it to the Page_Load procedure definition line in the .aspx file.
 
Big gold stars all around!!

I don't know if it was restarting the machine I'm on right now. (errrr.... duh! <smack>).. or putting the &quot;hello world&quot; in the code behind instead of on the aspx page.. .but by golly! She works!! Makes me really question the accuracy of the $40 book I bought....

Also, you'd THINK that MS's flagship development environment would register it's .dll's properly with no user intervention.... maybe I'm just asking too much... after all, I did pay full retail for this instead of stealing it...

Kimberly, according to both msdn and the now in doubt book I have, Only netscape versions below 6 require the <form> tag to display server controls... Thanks...

Thanks so much!
Kevin Howell
Briefcase of Talent
Austin, Tx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top