Every other aspect of my code works correctly outputting data from MyProducts to aspx, using for instance:. Edit 2, the debugging info. DataSource gets correctly loaded, but Repeater. DataItem is null. It should have a value, right? All you have to do is Re Bind Your Repeater when you do a postback to the server to maintain the values..
Doesn't this go against what you said earlier only bind the repeater if not postback? Should I.. IsPostback method in PageLoad event so that the values will retain in postbacks.. Yes because the method MyDataObject. That's not where the issue is. Sorry if I'm being unclear - it's hard to explain.
I'm not sure what I actually did to fix this since it was so long ago but I got a message from another member asking for the solution. So I tried to recreate the problem and have attached a working solution for anyone who is interested. The content you requested has been removed. Ask a question. To me, this is the most "straight-forward" approach I could think of using nested repeaters, but I may be wrong, and am more than willing to learn! And thanks for pointing out the correct newsgroup!
I'll use that for any further problems I run into! Hi, Well.. I meant I have never had the need of nesting repeaters, therefore I cannot tell you Based on experience if you need to recreate the nested repeaters , nevertheless I think you do!. The hidden approach would solve your problem if all you need to know is a single value, if the row has a PK in the dataset it should be enough to know which record was selected.
In general you can post asp. This discussion thread is closed Start new discussion. Similar topics ASP. Accessing renamed controls in code behind. Accessing a Control inside a Repeater from a code behind file.
Getting DataItem from a RepeaterItem. Nested Repeaters. Archived Forums. Web Forms Data Controls. Sign in to vote. User posted Hi, Can anyone explain why this happens? Equals e. Monday, February 18, PM. User posted This is expected behavior. User posted Unless you have actually stored the value within your Repeater, your only other option is to re-retrieve your data source and extract the data from it.
0コメント