Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
 
Old July 9th, 2008, 01:28 AM
Registered User
 
Join Date: Jul 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default a question from an asp.net learner fish

i met a problem which from
the last example in the third chapter of the book beginning asp.net using vb.net
when i click the submit i receive the wrong information as:



Server Error in '/fqm' Application.
--------------------------------------------------------------------------------

Control 'fullname' of type 'TextBox' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Control 'fullname' of type 'TextBox' must be placed inside a form tag with runat=server.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.



i really hope someone who can help me Thanks first!:)


 
Old July 16th, 2008, 10:01 PM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dotnetter_ohio
Default

I think what it is telling you is that there must be a <form></form> set of tags on the page, somewhere. All of the <asp:xxx> tags need to be within 1 set of form tags on a page.

Let me know if this helps.

http://www.dotnetohio.com
 
Old July 17th, 2008, 01:06 AM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

More than that, the <FORM> tag needs to be <FORM runat=server>.

I don't think ASP.NET will pay attention to <FORM>s that aren't so specified.
 
Old July 17th, 2008, 02:41 AM
Registered User
 
Join Date: Jul 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the original code :
<form action="holidaypage.aspx method="post">

in this book he do not use runat="server" , because it said runat="server" will forbid users transform to another page,
because we created an action attribute automaticlly. if we try to cover the first page with another page by using the action attribute
it will no effect.

so i really puzzled by this explainmation.[8)


 
Old July 17th, 2008, 07:56 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Quote:
quote:Originally posted by Old Pedant
 I don't think ASP.NET will pay attention to <FORM>s that aren't so specified.

Correct, a form tag not containing "runat='server'" can be placed on the page anywhere. It is treated as meaningless literal text from the perspective of ASP.NET. Of course, this does not mean that you can embed a non-server form tag into a server form tag and have it function. That breaks the HTTP model.

I don't have the book you are looking at in front of me. However, I can make the observation and assertion that there is nothing to stop you from creating a regular HTML page with a form that points at an ASPX page. However, you aren't going to get the same functionality as you would if you started with the web form itself (on the same aspx page). When they built ASP.NET they maintained much of the behavior and conventions (even some buggy features) from classic ASP in order to make ASP->ASP.NET migration easier. You can use the Request object in ASP.NET to interrogate the HTTP request (for posted form values for example) that originated from another page. I imagine that is what is being suggested.

-Peter
compiledthoughts.com
 
Old July 17th, 2008, 02:03 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Very minor quibble, to live up to my screen name.

planoie wrote:
Correct, a form tag not containing "runat='server'" can be placed on the page anywhere.

Ummm...but *NOT* within any other <form>...</form> pair, including both those containing and not containing runat=server. Not an ASP.NET restriction; HTML can't handle nexted forms.
 
Old July 18th, 2008, 06:39 AM
Registered User
 
Join Date: Jul 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i am very pleased to receive to your suggestion.
i think i almost understand what the problem is
and i will try it with your advice;)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for best learner book etippelt Visual C++ 0 July 12th, 2007 01:47 AM
search friends of c# learner spring21st C# 0 April 7th, 2006 06:15 AM





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