Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Re: Pagelet Controls without values set


Message #1 by "Fredrik Normen" <fredrik.normen@e...> on Wed, 01 Nov 2000 10:16:45 +0100
Try to add =FORM RUNAT=Server before you use the Web controls and of 

course /FORM after your controls



If you use SELECT  instead of asp listbox runat=Server

add runat=server into the select element



Please let me know if this fix your problem



/Fredrik Norm=E9n









----- Original Message -----

From=3A =22Terry Carr=22 =3Cterry=40rinasystems=2Ecom=3E

Date=3A Tuesday=2C October 31=2C 2000 4=3A57 pm

Subject=3A =5Baspx=5D Pagelet Controls without values set



=3E I have an aspx page that I tried breaking the code up into 



=3E pagelets (one for the menu on the left=2C one for the content in the 



=3E middle=2C and one for the banners on the right)=2E  



=3E 



=3E Maybe I shouldn=27t be designing it this way=2C or maybe there is a 



=3E bug=2C but here is what is happening=3A

=3E 



=3E    in the content pagelet=2C I have a dropdownlist with the 



=3E categories=2E  Below the dropdownlist is a datagrid with the 



=3E products in that category=2E  When an item is selected in the 



=3E dropdownlist=2C I have it automatically post the form back so I can 



=3E display the new product list=2E  I have a PageLoad routine in the 



=3E pagelet that calls the vb routine that  returns the ADO+ dataset 



=3E that will be bound to the datagrid=2E

=3E 



=3E This works when not in post back and everything loads correctly=2E  



=3E However=2C if it is in postback=2C the DropDownList does not have a 



=3E selected item=2E  It=27s as if it doesn=27t know that anything is loa

ded 



=3E in the list=2E  



=3E 



=3E If I take the code from the pagelet and paste it into a simple 



=3E HTML page=2C it works correctly=2E  



=3E 



=3E Can anyone think of a way around this problem=2E  I don=27t want to 



=3E keep the code in the main page=2C since I will have several display 



=3E modes in this Page and the code would get unwieldy=2E  Includes 



=3E would be ok=2C but I don=27t think I can add the pageload routine to 



=3E the include=2E

=3E 



=3E 



=
Message #2 by "Terry Carr" <terry@r...> on Wed, 1 Nov 2000 08:39:51 -0500
I do have a form runat="server" at the start of the page and I close with

/form at the end.



I'm wondering if it has something to do with maintainstate or a property

like that.  The problem is that by the time I get into the pageload in the

pagelet, it no longer knows about the value that was selected in the list.





----- Original Message -----

From: "Fredrik Normen" <fredrik.normen@e...>

To: "ASP+" <aspx@p...>

Sent: Wednesday, November 01, 2000 4:16 AM

Subject: [aspx] Re: Pagelet Controls without values set





Try to add =RM RUNAT=rver before you use the Web controls and of

course /FORM after your controls



If you use SELECT  instead of asp listbox runat=rver

add runat=rver into the select element



Please let me know if this fix your problem



/Fredrik Normén









----- Original Message -----

From: "Terry Carr" <terry@r...>

Date: Tuesday, October 31, 2000 4:57 pm

Subject: [aspx] Pagelet Controls without values set



> I have an aspx page that I tried breaking the code up into

> pagelets (one for the menu on the left, one for the content in the

> middle, and one for the banners on the right).

>

> Maybe I shouldn't be designing it this way, or maybe there is a

> bug, but here is what is happening:

>

>    in the content pagelet, I have a dropdownlist with the

> categories.  Below the dropdownlist is a datagrid with the

> products in that category.  When an item is selected in the

> dropdownlist, I have it automatically post the form back so I can

> display the new product list.  I have a PageLoad routine in the

> pagelet that calls the vb routine that  returns the ADO+ dataset

> that will be bound to the datagrid.

>

> This works when not in post back and everything loads correctly.

> However, if it is in postback, the DropDownList does not have a



> selected item.  It's as if it doesn't know that anything is loaded

> in the list.

>

> If I take the code from the pagelet and paste it into a simple

> HTML page, it works correctly.

>

> Can anyone think of a way around this problem.  I don't want to

> keep the code in the main page, since I will have several display

> modes in this Page and the code would get unwieldy.  Includes

> would be ok, but I don't think I can add the pageload routine to

> the include.

>

>

Message #3 by "Terry Carr" <terry@r...> on Wed, 1 Nov 2000 11:51:26 -0500
We figured out what the problem was.  We had a <% Page ... line in the

pagelet by mistake (the joys of copy and paste).  This command must

reinitialize controls or something.  Anyway, when we took it out everything

worked the way is should.




  Return to Index