New to ASP.NET Please help

G

Guest

I get the following error:

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'SPANComment'
could not be found (are you missing a using directive or an assembly
reference?)

Source Error:



Line 4: <SCRIPT LANGUAGE="C#" RUNAT="Server">
Line 5: void SubmitBtn_Click(Object sender,EventArgs e){
Line 6: SPANComment.InnerHtml="Here are the details we received:<BR/><BR/>"+
Line 7: "FirstName:"+textboxFirstName.Text+"<BR/>"+
Line 8: "LastName:"+textboxLastName.Text+"<BR/>"+


Source File: c:\inetpub\wwwroot\SubmitReceiveComments.aspx Line: 6

with the code that I have:

<%@Page Language="C#"%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="C#" RUNAT="Server">
void SubmitBtn_Click(Object sender,EventArgs e){
SPANComment.InnerHtml="Here are the details we received:<BR/><BR/>"+
"FirstName:"+textboxFirstName.Text+"<BR/>"+
"LastName:"+textboxLastName.Text+"<BR/>"+
"Comments:"+textareaComments.Value+"<BR/>";}
</SCRIPT>
</HEAD>
<BODY>
<FONT FACE="Verdana">
<H3>Welcome to my site!</H3>
What comments do you have about our site?
<FORM ACTION="SubmitReceiveComments.aspx" METHOD="POST" RUNAT="Server">
First Name: <ASP:TEXTBOX ID="textboxFirstName" RUNAT="Server"/><BR/>
Last Name: <ASP:TEXTBOX ID="textboxLastName" RUNAT="Server"/><P/>
Comments:<P/>
<TEXTAREA COLS="50" ROWS="5" ID="textareaComments" RUNAT="Server">
</TEXTAREA><P/>
<ASP:BUTTON TEXT="Send Comments" ONCLICK="SubmitBtn_Click"
RUNAT="Server" />
<BR/><BR/>
<SPAN ID="spanComment" RUNAT="Server" />

<H3> Thank You Your Comments were received.</H3>
Here are the details we received<BR/><BR/>
First Name. <%=Request.Form("textboxFirstName")%><BR/>
Last Name. <%=Request.Form("textboxLastName")%><BR/>
Comments. <%=Request.Form("textareaComments")%><BR/>

</FORM>
</FONT>
</BODY>
</HTML>
 
G

Guest

In Line 6 I've changed the ID of the "SPANComment" in "spanComment" because
below I declared the SPAN ID=spanComment.
I've deleted some lines that were duplicated because i put them in the span
zone and at the end of the source code, of course with other ID's of the
controls because i'm an absolute beginner :).
This are the rows that i've deleted:


And it worked.

I hope that the answer it will be helpful.

Cristina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top