Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > error..of type 'TextBox' must be placed inside a form tag with runat=server

Reply
Thread Tools

error..of type 'TextBox' must be placed inside a form tag with runat=server

 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      01-05-2005
Try removing Runat=server from the textbox inside the template.

Eliyahu

"Jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I placed a checkboxcontrol in a datagrid:
>
> <form id="Form1" method="post" runat="server">
> <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;

POSITION:
> absolute; TOP: 56px"
> runat="server" Height="288px" Width="368px">
> <Columns>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
> DataItem.customerid"))%' Runat=server>
> </asp:TextBox>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </aspataGrid>
> </form>
>
> the textbox is enclosed by the form tag so what could be wrong?
>
> ch Jim
>
>



 
Reply With Quote
 
 
 
 
Rock
Guest
Posts: n/a
 
      01-05-2005
You don't need parens around the DataBinder:

<asp:TemplateColumn HeaderText="Validated">
<ItemTemplate>
<asp:textbox id=test
runat="server"
Text='<%#DataBinder.Eval(Container.DataItem,
"Validated") %>'>
</asp:textbox>

</ItemTemplate>
</asp:TemplateColumn>

"Jim" <(E-Mail Removed)> wrote in message
news:e%(E-Mail Removed)...
> i tried that then your textbox is gone!
>
> Jim
> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Try removing Runat=server from the textbox inside the template.
> >
> > Eliyahu
> >
> > "Jim" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi
> > >
> > > I placed a checkboxcontrol in a datagrid:
> > >
> > > <form id="Form1" method="post" runat="server">
> > > <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;

> > POSITION:
> > > absolute; TOP: 56px"
> > > runat="server" Height="288px" Width="368px">
> > > <Columns>
> > > <asp:TemplateColumn>
> > > <ItemTemplate>
> > > <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
> > > DataItem.customerid"))%' Runat=server>
> > > </asp:TextBox>
> > > </ItemTemplate>
> > > </asp:TemplateColumn>
> > > </Columns>
> > > </aspataGrid>
> > > </form>
> > >
> > > the textbox is enclosed by the form tag so what could be wrong?
> > >
> > > ch Jim
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
 
Jim
Guest
Posts: n/a
 
      01-06-2005
thanks Rock but it still gives the error

"Rock" <(E-Mail Removed)> schreef in bericht
news:%23zq3a%(E-Mail Removed)...
> You don't need parens around the DataBinder:
>
> <asp:TemplateColumn HeaderText="Validated">
> <ItemTemplate>
> <asp:textbox id=test
> runat="server"
> Text='<%#DataBinder.Eval(Container.DataItem,
> "Validated") %>'>
> </asp:textbox>
>
> </ItemTemplate>
> </asp:TemplateColumn>
>
> "Jim" <(E-Mail Removed)> wrote in message
> news:e%(E-Mail Removed)...
>> i tried that then your textbox is gone!
>>
>> Jim
>> "Eliyahu Goldin" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Try removing Runat=server from the textbox inside the template.
>> >
>> > Eliyahu
>> >
>> > "Jim" <(E-Mail Removed)> wrote in message
>> > news:(E-Mail Removed)...
>> > > Hi
>> > >
>> > > I placed a checkboxcontrol in a datagrid:
>> > >
>> > > <form id="Form1" method="post" runat="server">
>> > > <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;
>> > POSITION:
>> > > absolute; TOP: 56px"
>> > > runat="server" Height="288px" Width="368px">
>> > > <Columns>
>> > > <asp:TemplateColumn>
>> > > <ItemTemplate>
>> > > <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
>> > > DataItem.customerid"))%' Runat=server>
>> > > </asp:TextBox>
>> > > </ItemTemplate>
>> > > </asp:TemplateColumn>
>> > > </Columns>
>> > > </aspataGrid>
>> > > </form>
>> > >
>> > > the textbox is enclosed by the form tag so what could be wrong?
>> > >
>> > > ch Jim
>> > >
>> > >
>> >
>> >

>>
>>

>
>



 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      01-06-2005
Hi

I placed a checkboxcontrol in a datagrid:

<form id="Form1" method="post" runat="server">
<aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px; POSITION:
absolute; TOP: 56px"
runat="server" Height="288px" Width="368px">
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
DataItem.customerid"))%' Runat=server>
</asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</aspataGrid>
</form>

the textbox is enclosed by the form tag so what could be wrong?

ch Jim


 
Reply With Quote
 
Eliyahu Goldin
Guest
Posts: n/a
 
      01-06-2005
Looks like you are missing closing >.

Eliyahu

"Jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I placed a checkboxcontrol in a datagrid:
>
> <form id="Form1" method="post" runat="server">
> <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;

POSITION:
> absolute; TOP: 56px"
> runat="server" Height="288px" Width="368px">
> <Columns>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
> DataItem.customerid"))%' Runat=server>
> </asp:TextBox>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </aspataGrid>
> </form>
>
> the textbox is enclosed by the form tag so what could be wrong?
>
> ch Jim
>
>



 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      01-06-2005
i tried that then your textbox is gone!

Jim
"Eliyahu Goldin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Try removing Runat=server from the textbox inside the template.
>
> Eliyahu
>
> "Jim" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi
> >
> > I placed a checkboxcontrol in a datagrid:
> >
> > <form id="Form1" method="post" runat="server">
> > <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;

> POSITION:
> > absolute; TOP: 56px"
> > runat="server" Height="288px" Width="368px">
> > <Columns>
> > <asp:TemplateColumn>
> > <ItemTemplate>
> > <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
> > DataItem.customerid"))%' Runat=server>
> > </asp:TextBox>
> > </ItemTemplate>
> > </asp:TemplateColumn>
> > </Columns>
> > </aspataGrid>
> > </form>
> >
> > the textbox is enclosed by the form tag so what could be wrong?
> >
> > ch Jim
> >
> >

>
>



 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      01-07-2005
thanks E but this doesn't fix it either

"Eliyahu Goldin" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed)...
> Looks like you are missing closing >.
>
> Eliyahu
>
> "Jim" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Hi
>>
>> I placed a checkboxcontrol in a datagrid:
>>
>> <form id="Form1" method="post" runat="server">
>> <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;

> POSITION:
>> absolute; TOP: 56px"
>> runat="server" Height="288px" Width="368px">
>> <Columns>
>> <asp:TemplateColumn>
>> <ItemTemplate>
>> <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
>> DataItem.customerid"))%' Runat=server>
>> </asp:TextBox>
>> </ItemTemplate>
>> </asp:TemplateColumn>
>> </Columns>
>> </aspataGrid>
>> </form>
>>
>> the textbox is enclosed by the form tag so what could be wrong?
>>
>> ch Jim
>>
>>

>
>



 
Reply With Quote
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      01-12-2005
Hey Jim,

You just need to put the quotes in the right places and not add extras. You
have a quote after customerid" that shouldn't be there. Try this?

<form id="Form1" method="post" runat="server">
<asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px;
POSITION: absolute; TOP: 56px"
runat="server" Height="288px" Width="368px">
<columns>
<asp:templatecolumn>
<itemtemplate>
<asp:TextBox ID="test"
Text='<%#(DataBinder.Eval(Container,DataItem.custo merid))%>' Runat="server">
</asp:textbox>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
</form>

Ken
Microsoft MVP [ASP.NET]

"Jim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi
>
> I placed a checkboxcontrol in a datagrid:
>
> <form id="Form1" method="post" runat="server">
> <aspataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 152px; POSITION:
> absolute; TOP: 56px"
> runat="server" Height="288px" Width="368px">
> <Columns>
> <asp:TemplateColumn>
> <ItemTemplate>
> <asp:TextBox ID="test" Text='<%#(DataBinder.Eval(Container,
> DataItem.customerid"))%' Runat=server>
> </asp:TextBox>
> </ItemTemplate>
> </asp:TemplateColumn>
> </Columns>
> </aspataGrid>
> </form>
>
> the textbox is enclosed by the form tag so what could be wrong?
>
> ch Jim
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
of type 'TextBox' must be placed inside a form tag with runat=serv =?Utf-8?B?QWxpeHggU2tldmluZ3Rvbg==?= ASP .Net 2 04-22-2005 02:15 PM
Control 'X' of type 'RadioButton' must be placed inside a form tag with runat=server. Tom wilson ASP .Net 7 02-10-2005 06:47 PM
must be placed inside a form tag with runat=server with inheritanc =?Utf-8?B?dHJpbml0eXBldGU=?= ASP .Net 2 12-22-2004 02:59 AM
Control must be placed inside a form tag John ASP .Net 2 11-03-2004 07:58 AM
Run-time error: <Control Name> must be placed inside a form tag with runat=server Matthew Louden ASP .Net 4 11-18-2003 06:16 PM



Advertisments