a lack of understanding

 
Post new topic   Reply to topic    Aprelium Forum Index -> ASP.NET
View previous topic :: View next topic  
Author Message
Flux
-


Joined: 13 Oct 2006
Posts: 48

PostPosted: Sun Nov 19, 2006 7:53 pm    Post subject: a lack of understanding Reply with quote

I've been writing (failing to write) a script that is hopefully going to end up being an incredibly simplified version of the flooble chatterbox ([url]flooble.chatterbox.com[/url]) (I'm writing it because I hate the ads)

I've been having a problem lately with the button that submits a comment with the alias and comment. The error highlights:
<asp:Button runat="server" class="submit" OnClick="submit_chat" Text="chat"/>
specifically the 'onclick="submit_chat"' part, and says:
BC30456: 'submit_chat' is not a member of 'ASP.chat_chat_aspx'.
(chat.aspx is the name of the file involved)

I have sub submit_chat in the same file in script tags and everything. What does the compiler mean?
_________________
My signature is so lame.

I think phpBB forums hates my laptop '.';
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Sun Nov 19, 2006 8:33 pm    Post subject: Reply with quote

OnClick is a JavaScript function and has nothing to do with ASP.NET as far as I know.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
Flux
-


Joined: 13 Oct 2006
Posts: 48

PostPosted: Mon Nov 20, 2006 5:17 am    Post subject: Reply with quote

It works in all my other scripts (which are either vb or c#)....
_________________
My signature is so lame.

I think phpBB forums hates my laptop '.';
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Mon Nov 20, 2006 1:52 pm    Post subject: Re: a lack of understanding Reply with quote

Flux,

This means that the function is declared as being not related to your button class. Posting the whole source code (without the actual code of each , just { ... } but with all the declarations and function/class prototypes) would help us suggest a solution.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Flux
-


Joined: 13 Oct 2006
Posts: 48

PostPosted: Mon Nov 20, 2006 5:45 pm    Post subject: Reply with quote

Oops. How'd that happen? See the next post..
_________________
My signature is so lame.

I think phpBB forums hates my laptop '.';


Last edited by Flux on Mon Nov 20, 2006 5:51 pm; edited 1 time in total
Back to top View user's profile Send private message
Flux
-


Joined: 13 Oct 2006
Posts: 48

PostPosted: Mon Nov 20, 2006 5:49 pm    Post subject: Reply with quote

Hehe...eh.. :oops:
About that. Here's the code thus far, and so far I was busy working on getting the button to work so I didn't pay much attention to the sub, yet.
Although, as you can see, I need help on that too, so that would be appreciated.

Code:

Public Sub submit_chat()
public x as file "chat.txt"
    if chatid.text = "" and chatmsg.text = ""
       msgbox("You didn't enter anything...")
    elseif chatid.text = ""
       msgbox("You can't submit a message without a name.")
    elseif chatmsg.text = ""
       msgbox("Are you going to say something?")
    else
       x.writeline("<b>" & chatid.text & ":</b> " & chatmsg.text)
    end if
end Sub       
<!--#include file="/chat/chat.txt"-->
<br />
<p>Alias:<asp:TextBox runat="server" id="chatid" class="textbox" size="20" /></p>
<p>Msg:<asp:TextBox runat="server" id="chatmsg" class="textbox" size="20" /></p>
<p><asp:Button runat="server" class="submit" OnClick="submit_chat" Text="chat"/></p>


Anyway, so there's the button and the corresponding sub directly above it. I'm starting to think this is too simple to work.

Also, above in the script, is an area where I just made something up as a placeholder for my idea about how to finish the script in that area, but I'm not sure exactly how to finish that area either, so help is needed.

edit: Took out the html, body, and script tags because I think the forum was trying to read it...
_________________
My signature is so lame.

I think phpBB forums hates my laptop '.';
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Nov 21, 2006 5:11 pm    Post subject: Reply with quote

Flux,

Your script should be enclosed between <script> and </script> tags as in http://samples.gotdotnet.com/quickstart/aspplus/doc/webformssyntaxref.aspx#code .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Flux
-


Joined: 13 Oct 2006
Posts: 48

PostPosted: Tue Nov 21, 2006 5:14 pm    Post subject: Reply with quote

Um...yeah...well I tried posting that but the forum glitched and gave me a 500 error.. Anyway they're in there.
_________________
My signature is so lame.

I think phpBB forums hates my laptop '.';
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> ASP.NET All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group