-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: rags_rao
Message 1 in Discussion
i have a requirement wherein i have to display n items in a row like folders are
displaeyd in browser. i'm using asp repeater to acheive this like,
protected int itemsPerRow=3;
class ...
{
page_load()
{
itemsPerRow = somelogic;
...
bind repeater
}
}
and in aspx:
<asp:repeater>
---
<%#(((int)DataBinder.Eval(Container.DataItem,"RowNo"))%itemsPerRow==0)?" ":""%>
[
note: this is a old logic where i add a new column to table called RowNo and populate
it with the row index+1. this isnt necessary u can achieve it using a cnt variable
<%if(cnt++%itemsPerRow==0) Response.Write(" ");%> and this works
fine even if i assign itemsperpage after binding. the diff is <% is used intead of <%#
which is understandable
]
this works fine
but if i interchange the 2 lines in code behind
......
bind repeater
itemsPerRow = somelogic;
3 items (this is the default value) is diaplayed per row.
this at first sight looks simple because i assign after i have bound. but if i put a
break point in aspx. it is hit only after all code behind is executed. i.e after
itemsPerRow gets its new value. i have verified it @ the end of page load.
but in the aspx the value is still 3 (i.e still 3 in <%# tag but actual value can be
retrived in a <% tag). how is that possible? can somebody throw light on this?
............. and i hope i have not confused u guys.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]