CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_forms Tags:
Item Type: NewsGroup Date Entered: 8/18/2004 6:12:17 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 0 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
myfanwy
Asp.Net User
limit to length of drop down list??8/18/2004 6:12:17 PM

0/0

Hello

I hope you can help with this, I've been 4 days on it!

The first page of my site contains some ddls that are populated from an Access database. The retrieval of data is fine and the data binds ok and appears in the drop down lists. I also have a button that posts back and then passes the selected items onto a second page where the db is searched.

The trouble is that I kept getting 'Page cannot be displayed" messages. So I rebuilt the page piece by piece and discovered that if one of my ddls is too long, I get the message when I click the button. The threshold is 168 lines! After the 169th I get this message. I don't think that is an especially long ddl. Incidentally, I removed all the code from the postback subroutine while testing this. All I have to do is to remove the .DataBind line from this one ddl and all is ok. I have played around a lot with the page and can also reproduce the problem if I increase some of the other ddls. So there seems to be a rather small limit imposed somewhere. And I don't know where.

Does anyone know what could cause this?

I am running asp.net 1.1 on Windows 2000 sp4 with 1G memory and the problem is the same on web matrix v0.5 and v0.6

ps can anyone tell me why I don't have line numbers in v0.6 of Web Matrix on the All tab?
peterbrunone
Asp.Net User
Re: limit to length of drop down list??8/24/2004 1:21:29 AM

0/0


How are you populating these lists? Maybe your data retrieval method is slow. I've never heard of a limit like that; show us some code.

Also, what's the real error? Have you unchecked "Show friendly HTTP error messages" in
Internet Explorer under Tools-->Internet Options-->Advanced?


> ps can anyone tell me why I don't have line numbers in v0.6 of Web Matrix on the All tab?

Good question. At least you only have to click the box four times, and that's only if you're using all the supportedlanguages :)
Peter Brunone
MS MVP, ASP.NET
Founder, EasyListBox.com
Do the impossible, and go home early.
myfanwy
Asp.Net User
Re: limit to length of drop down list??8/24/2004 10:44:21 PM

0/0

Hi Peter

Thanks for replying, I am still having this problem. I have unchecked the option in Internet Explorer but, unfortunately, it makes no difference.

In order that you can see what code I have, I have created a small example so you can see what is happening. The Access db has one table tblDDL with two fields: an autonumber and a text field. Each text field contains the text ?flower?.

There is no problem displaying the data in the ddl. The problem is on post back and depends on the number of records that are bound to the ddl.

Using the following code, when there are 395 records or less, the page is posted back when I click the SearchButton. When there are 396 or more, when I click the SearchButton, I get the Internet Explorer message ?Page cannot be displayed? and the page is not posted back. It is the same with Web Matrix v0.5 and v0.6

Here is the code. I hope you can help as I need to populate these ddls with hundreds of items.

<%@ Page Language="VB" Explicit="true" Debug="True" %>
<%@ import Namespace="System.IO" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">
Dim conn As OleDbConnection = New OleDbConnection ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=N:\asp stuff\testddl.mdb")
Dim DataAdapter As OleDbDataAdapter
Dim DSet As DataSet

Sub Page_Load(sender as Object, e as EventArgs)
If not Page.IsPostBack Then
conn.Open()
DSet = New DataSet()
DataAdapter = New OleDbDataAdapter("Select DDLText from tblDDL", conn )
DataAdapter.Fill(DSet, "tblDSDDL")
With ddlTest
.DataSource = DSet
.DataTextField = "DDLText"
.DataBind
End With
End If
End Sub
Sub SearchButton_Click(sender As Object, e As EventArgs)
Message.Text = "Page did Post Back"
End Sub
</script>
<html>
<head></head>
<body>
<form runat="server">
<p>
<asp:dropdownlist id="ddlTest" runat="server" AutoPostBack="False"></asp:dropdownlist>
<asp:Button id="SearchButton" onclick="SearchButton_Click" runat="server" Text="Search Button"></asp:Button>
<asp:Label id="Message" runat="server">Page Not Posted Back Yet</asp:Label>
</p>
</form>
</body>
</html>

Thanks

peterbrunone
Asp.Net User
Re: limit to length of drop down list??8/25/2004 12:28:08 AM

0/0


What's the *full* text of the error message? There must be more than that.


Peter Brunone
MS MVP, ASP.NET
Founder, EasyListBox.com
Do the impossible, and go home early.
myfanwy
Asp.Net User
Re: limit to length of drop down list??8/25/2004 9:34:29 AM

0/0

Hi Peter,
Thanks for replying
Here is the message:-

The page cannot be displayed
The page you are looking for might have been removed or had its name changed.

--------------------------------------------------------------------------------

Please try the following:

Open the localhost:93 home page, and then look for links to the information you want.

If you typed the page address in the Address bar, make sure that it is spelled correctly.

If you still cannot open the page, click the Internet Explorer
Search button to look for similar sites.




Internet Explorer
peterbrunone
Asp.Net User
Re: limit to length of drop down list??8/25/2004 2:21:25 PM

0/0


Wow. That's a weird problem. It looks like somehow your page is being redirected. What's the name of the page, and what is in the browser's address bar when you get the error?

If you like, send me the rendered HTML (from View Source in the browser) with more than 395 items, so it throws the error. My email address is peter at easylistbox.com (change " at " to "@").


Peter Brunone
MS MVP, ASP.NET
Founder, EasyListBox.com
Do the impossible, and go home early.
6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering AutoCAD 2005 and AutoCAD LT 2005 Authors: George Omura, Pages: 1151, Published: 2004
Access 2003 Bible Authors: Cary N. Prague, Michael R. Irwin, Jennifer Reardon, Pages: 1464, Published: 2003
AutoCAD for Architecture Authors: Tuna Saka, Pages: 827, Published: 2001
Introductory Biophysics Authors: Frederick Ross Hallett, P. A. Speight, Robert Henry Stinson, W. G. Graham, Pages: 243, Published: 1977
The Toolbox Book: A Craftsman's Guide to Tool Chests, Cabinets, and Storage Systems Authors: Jim Tolpin, Pages: 208, Published: 1998
AutoCAD 2006 For Dummies Authors: Mark Middlebrook, David Byrnes, Pages: 413, Published: 2005

Web:
Limit length of drop-down menu Limit length of drop-down menu Website Scripts Forum. ... How do you limit the length of the drop down when you've got lots of elements - ie ...
to limit the length of the drop down list in selectOneMenu in JSF May 27, 2008 ... Hello , Could you, please, help on the following: Is there a way to limit the length of the drop down list in selectOneMenu in JSF. ...
'Re: to limit the length of the drop down list in selectOneMenu in ... May 29, 2008 ... [prev in list] [next in list] [prev in thread] [next in thread] List: myfaces- user Subject: Re: to limit the length of the drop down list in ...
WikiAnswers - How can we limit the size of dropdown list using asp ... Computer Programming question: How can we limit the size of dropdown list using asp.net if there is 20 items and i want to view only ten items rest is ...
drop down list: size To limit your list, don't insert the data. The drop down list is not .... We have looked into using the SIZE attribute and also the LENGTH ...
to limit the length of the drop down list in selectOneMenu in JSF ... Apr 10, 2008 ... Is there a way to limit the length of the drop down list in selectOneMenu in JSF . I added size="10" but it is not working. ...
Limit display length of drop down selection list : PHP, Firefox ... Jul 6, 2008 ... Hi: I'm trying to limit the display length of a drop-down selection list. Several of the items from which the user will select from are ...
'to limit the length of the drop down list in selectOneMenu in JSF ... 2008-05-29 Re: to limit the length of the drop down list in sele myfaces-u Andrew Robinson 2. 2008-05-28 RE: to limit the length of the drop down list in ...
Drop-down menu for Recent Posts - Freshblog Jul 27, 2005 ... Is it possible to display drop-down menu of recent posts on the "post page" ... has anybody figured out how to change the text length in the drop down menu, ... You can use CSS to limit the size of the unselected box. ...
a drop down menu html field how to limit it's size to eg 15 ... a drop down menu html field how to limit it's size to eg 15 characters [ HORIZONTALLY HTML.

Videos:
"Drop Down" by E-La-Te' New Orleans: Old School slow song
No limits coasters, DOWN BELOW, (4th COASTER ALBUM) Down below is a twin drop coaster made by marshall coasters. this is now my fav nolimits coaster i have made. pictures of this coaster can be ...
KH2FM - Marluxia No Damage/Limit/Magic/Drive/etc (LV1 CM) Finally, I got to fight Marluxia in my LV1 challenge. If you haven't figured it out already, I love fighting this guy. He's just too fun. But I ...
WHO CARES ABOUT SPEED LIMITS ? Drivers who don't like talking to police will have to slow down on the back roads of Eagle. On most residential streets in the city, the speed ...
KH2FM - Terra x5 NOTE: Read description before posting comment questions or whatever else idiots post. Note: This is the only area this works in. You also ...
CitizenGrapski.mp4 This is a story of fighting corruption in America - from the small town/city up rather than the presidency/congress down. It is also the story of ...
Nokia N95 con nuevo firmware (20.0.0.015) Pequeño video para mostrar algunos cambios con el nuevo firmware del N95. Review Parte 1: http://www.youtube.com/watch?v=iP2w-ta99dk Review ...
Samurai Champloo AMV - Stop Drop ok this is my first and last time trying this style. almost killed my WMM. you can thank people like suckafish80 and raseng0n23 as well as others ...
96-foot-high FMX Jump? Red Bull New Year's Eve No Limits Teaser 1 After breaking the Guinness World Record with a motorcycle leap of 322 feet, 7.5 inches at the 2007 Red Bull New Year's Eve Experiment, Robbie ...
KH2FM - Demyx No Damage/Drive/Limit/Item (LV1 CM) Demyx wasn't too bad for me. That's probably because I spent a lot of time getting no damage against him in KH2. The only difference here is a ...




Search This Site:










web.config - connect timeout

asp.net login page using c#

stop user from finding the url of our application

make user control able to use variables in web form

url button

registerclientscriptblock

created a form, what am i missing

help! - i'm completely stuck!

access a control inside a template

fileuploader control and html input type="file" ?

why page_load is called before button_click is called?

validifying existense of request.querystring and calling javascript function

read values from controls in ascx (but in aspx file)

how to show word doc's saved in sql server

file upload routine & file download routine

how can you use a webusercontrol in code i.e. dim mc as myusercontrol

multiview and formdata view issues

display image in image control from database?

want to read field value from microsoft word file into webform

getting user signature in web page

creating a navigation menu for aspx page

imagebuttons do not work in windows xp pro

viewstate and postback

user input to an access database

post back

unicode????

user controls and global page variables

anchors, positioning and postback?

process data from popup

question about file upload

  Privacy | Contact Us
All Times Are GMT