473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

don't understand error

..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
Nov 18 '05 #1
3 946
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" <mm*****@epix.net> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
.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

Nov 18 '05 #2
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" <mm*****@epix.net> wrote in message
news:ua**************@TK2MSFTNGP10.phx.gbl...
.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

Nov 18 '05 #3
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.)

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Jace Benson | last post by:
Ok I have read alot of things on zend.com, php.net and other sites went to the wikibooks to try to understand how to use a class. I have this project I want to do that I am sure would work great...
31
by: Jo | last post by:
class A { public: char text_a; A() { *text_a=0; } ~A() {} }; //-----------------------------------------------------------------------------
3
by: Ben Thomas | last post by:
Hello, I have the following code which I don't understand why it works : #include <iostream> using namespace std; void DontWork (unsigned int& i) { cout << i << endl; }
0
by: Stef Mientki | last post by:
Terry Reedy wrote: sorry, don't know how this happened, as I always copy/paste ? AFAIK locals() == sys._getframe(0).f_locals AFAIK, again one level up weird, I use it in 2.5 and if I remember...
5
by: Thierry | last post by:
Hello fellow pythonists, I'm a relatively new python developer, and I try to adjust my understanding about "how things works" to python, but I have hit a block, that I cannot understand. I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.