Wrox Programmer Forums
|
Wrox Book Feedback A forum to submit feedback on Wrox books if other forums on P2P have been unable to address your book-specific needs. IF YOU ARE LOOKING FOR CODE DO NOT ASK "Where can I find the code for this book?" That question is answered here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Wrox Book Feedback section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 3rd, 2005, 01:04 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default A Simple Problem

I am a reader of "Beginning ASP.NET using C#".
In my code,here it goes like this:
   "<asp:textbox id="textbox1 " />"
But I got an error message saying:
   "textbox" should be contained in a form having the property"runat=server".

As we know ,however,when we post to another page with :
"<form action="responsepage.aspx" method="post" >
  other codes
</form>"
 it is wrong to add the property"runat=server".

So,It really puzzled me.
Is there something wrong with my .NET Framework? (its edition is 1.1.4322.573)
By the way ,my IIS is OK,because I successfully tried many asp webs.
I need YOUR HELP ASAP!! Thanks very much!!



Reply With Quote
  #2 (permalink)  
Old February 3rd, 2005, 09:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No, the textbox and form must have runat="server", as you stated. You can't post data to another form; that is coming in .NET 2. For the meantime, you can look at alternatives for posting to another page.

http://www.dotnetjohn.com/articles.aspx?articleid=142
http://www.dotnetjohn.com/articles.aspx?articleid=134

Brian
Reply With Quote
  #3 (permalink)  
Old February 4th, 2005, 03:25 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks very much for replying!!

Yes ,We cann't post data to anthor form ,I do post data to anothor page:
"<form action="responsepage.aspx" method="post" >

 <asp:textbox id="textbox1" runat="server"/>

</form>"

Just as what is shown above,the code dosn't work.
The problem is even the code in the book Beginning ASP.NET using C# don't work here.

How to solve the problem?

Reply With Quote
  #4 (permalink)  
Old February 4th, 2005, 09:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

That's what I'm saying, you can't directly post to another form in ASP.NET 1.1. However, there are tricks to getting around that, that require a little more work.

It will be coming in ASP.NET 2.

Brian
Reply With Quote
  #5 (permalink)  
Old February 4th, 2005, 09:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

He might not understand that when you say 'form' you are referring to another aspx page.

Reply With Quote
  #6 (permalink)  
Old February 4th, 2005, 01:38 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Right, I should have said that instead. I mean another ASP.NET page. Sorry.
Reply With Quote
  #7 (permalink)  
Old February 6th, 2005, 06:10 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot!!

I have catched your meaning!

Reply With Quote
  #8 (permalink)  
Old July 23rd, 2007, 08:55 PM
Registered User
 
Join Date: Jun 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to fcortes
Default

I have the same problem...
I'm using visual studio 2005....
and asp.net 2.0

how come it doesnt work??? I can't get the other aspx page to load after I hit submit

In 2003 someone had the same issue http://p2p.wrox.com/archive/aspx_beg...2002-04/49.asp
and the solutions are not applicable... it seems obvious but (at least for me being a newbie) it's not

any help??


Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple != problem akentanaka XSLT 3 October 13th, 2008 11:54 PM
Simple Problem Little Shell XML 2 June 5th, 2006 03:30 PM
Simple problem rsa3des Classic ASP Basics 4 August 8th, 2005 06:14 PM
a simple problem aquarius XSLT 1 February 27th, 2004 06:17 AM
Simple Problem bsdb3 Java GUI 2 February 5th, 2004 09:05 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.