Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > don't understand error

Reply
Thread Tools

don't understand error

 
 
m miller
Guest
Posts: n/a
 
      01-09-2004
..NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1

I have a webform with a button, an html input a dropdown list and a data
grid. Users may use the drop down to choose a part number which then
posts back to the input and populates the grid.

In testing I can choose about 20 or 30 part numbers and all works well.
Then, all of a sudden, I get an app error:

Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
inside a form tag with runat=server

I don't have a DataGridLinkButton, nor can I find any references to one.

I'm really curious as to what this is all about.

Thanks,
m miller


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      01-09-2004
open your aspx page in html view. you will find that the control it is
complaining about appears after the closing form tag </form>
just move it inside the closing form tag and that should fix the problem for
you. it's a vs bug in the way vs rewrites a dirty aspx page.

--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"m miller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> .NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1
>
> I have a webform with a button, an html input a dropdown list and a data
> grid. Users may use the drop down to choose a part number which then
> posts back to the input and populates the grid.
>
> In testing I can choose about 20 or 30 part numbers and all works well.
> Then, all of a sudden, I get an app error:
>
> Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
> inside a form tag with runat=server
>
> I don't have a DataGridLinkButton, nor can I find any references to one.
>
> I'm really curious as to what this is all about.
>
> Thanks,
> m miller
>
>



 
Reply With Quote
 
 
 
 
Philip Rieck
Guest
Posts: n/a
 
      01-09-2004
if your datagrid has a <asp:ButtonColumn type="LinkButton"> in it, then the
datagrid is generating a DataGridLinkButton for you.

Most likely, this is due to the VS bug that places items outside a </form>
tag sometimes.

Open up your aspx file for this page in design view (not code view)
Click the "HTML" button just below the page, if "Design" is currently
selected.
Find your </form> tag, and make sure that it is AFTER all controls on your
page (it should probably have only </body></html> after it)

Now try your app.


"m miller" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> .NET 2003, Win XP and Win 2000 Pro, IE 6.0 SP1
>
> I have a webform with a button, an html input a dropdown list and a data
> grid. Users may use the drop down to choose a part number which then
> posts back to the input and populates the grid.
>
> In testing I can choose about 20 or 30 part numbers and all works well.
> Then, all of a sudden, I get an app error:
>
> Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
> inside a form tag with runat=server
>
> I don't have a DataGridLinkButton, nor can I find any references to one.
>
> I'm really curious as to what this is all about.
>
> Thanks,
> m miller
>
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      01-10-2004
Hi m miller,


Thank you for using Microsoft newsgroup Service. Based on your description,
when you run a page with some button, dropdownlist and DataGrid controls,
you encountered a error like:
Control 'dgOnHand__ctl1_ctl1' of type 'DataGridLinkButton' must be placed
inside a form tag with runat=server

As for this problem, I agree to Alvin and Philip 's suggestions. This is
most likely caused by some control element is put outside the <form ...
runat=server> 's </form> tag. You may have a check in the page's html
source as Alvin or Philip suggested. If you need any further assistant,
please feel free to post here.



Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

 
Reply With Quote
 
smitdso smitdso is offline
Junior Member
Join Date: Sep 2006
Posts: 4
 
      09-08-2006
I am facing the same problem but the form tag in design mode is just fine.

Please help
 
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
an error on multi-source, but I can't understand... Neil VHDL 11 03-11-2010 03:15 PM
Read all of this to understand how it works. then check around on otherRead all of this to understand how it works. then check around on other thelisa martin Computer Support 2 08-18-2005 06:40 AM
Understand why I am getting a "Specified cast is not valid" error =?Utf-8?B?Q2hhcmxlcw==?= ASP .Net 8 05-04-2004 04:06 PM
Error message I don't understand simon ASP .Net 1 12-05-2003 03:54 PM
Need help to understand this code error 'server error in /online application' Ketul Patel ASP .Net 1 11-29-2003 04:10 PM



Advertisments