ASP.NET controls that are required/not required to be inside form runat=server

  • Thread starter Thread starter Gary Bagen
  • Start date Start date
G

Gary Bagen

Hello,

I am working on a page transition scheme and was wondering what the
quickest way is to find out which ASP.NET controls need to be inside a
form with runat=server. I've determined that asp:Label does not need
to have the form runat=server and that asp:Textbox requires it.

Thanks,
Gar
 
Hi,

All controls which trigger control-specific evenst on the server will require runat=="server" tag... E.g. text box. (all server controls are included in this)

On the other hand, HTML Controls can trigger only page- level events on server (postback).

Since Label control happens to occurs in both Server controls and HTML controls, you may be getting confused. And I am asuming that you are talking about the HTML Label control, in your reference to remove the runat="server" tag.

FYI: If you have the runat="server' tag on the Label control, it will act as server controls, else
a HTML control.



----- Gary Bagen wrote: -----

Hello,

I am working on a page transition scheme and was wondering what the
quickest way is to find out which ASP.NET controls need to be inside a
form with runat=server. I've determined that asp:Label does not need
to have the form runat=server and that asp:Textbox requires it.

Thanks,
Gar
 
Back
Top