Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 11th, 2004, 11:16 PM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Runat = Server

I am a newbee of .NET C#. I've coded as below:

<form action="second.aspx" method="post">
  <P>What Martial Art do you like?
    <asp:radiobuttonlist id="radio1" runat="server">
        <asp:listitem value="Capoeira"/>
        <asp:listitem value="Shaolin"/>
        <asp:listitem value="JKD"/>
    </asp:radiobuttonlist>
  </P>
  <P><input type="submit" value="Submit"></P>
</form>

According to "Beginning ASP.NET using C#" page 131 said, no need to put "runat=server" at "<form>", but the page totally can't be loaded and errors have come out: "Control 'radio1_0' of type 'RadioButton' must be placed inside a form tag with runat=server."...

Could anyone tell me what's wrong?

  #2 (permalink)  
Old November 12th, 2004, 12:19 AM
Friend of Wrox
 
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

Server controls have to be inside a form with runat="server". On the other hand, if you are using only HTML (client Side) controls, ruat="server" is not needed. There can be only one form in a page with runat="server".

Regards
Ganesh
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runat server dilemma ? rsearing ASP.NET 2.0 Basics 1 November 24th, 2006 04:10 AM
<form runat="server"> gopi2008 ASP.NET 1.0 and 1.1 Basics 3 May 21st, 2006 11:07 PM
SQL Server sync with net server and browser server ne SQL Server DTS 0 June 13th, 2005 06:29 PM
HTML Control "select" runat="server" hamid HTML Code Clinic 3 October 13th, 2004 09:19 AM
[000] Unable to connect to server 'SERVER\SQL'; SQ ctanchan SQL Server 2000 1 August 15th, 2003 07:18 AM



All times are GMT -4. The time now is 10:41 AM.


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