Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird Problem: Repeater Not Showing

Status
Not open for further replies.

TheConeHead

Programmer
Aug 14, 2002
2,106
US
I have (what seems to me) as a strange problem. I have a repeater that is not showing. I do not get an error or anything, but the repeater is not producing what I think it should. It is not caching - I have made hard-coded text changes to other areas and those show, but the repeater prodices nothing - why might this be??

[conehead]
 
Going on that information, it could be anything. Maybe you haven't bound it, maybe it has no data, maybe the Visible property has been set to False...


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Here's a short hand version of the code:
Code:
<script language="C#" runat="server">
SqlConnection conn = .....;
SqlDataAdapter getqs = new SqlDataAdapter(query);

DataSet quesDS = new DataSet();
getqs.Fill(quesDS, "table");

quesr.DataSource = quesDS.Tables["table"].DefaultView;
quesr.DataBind();
}
</script>

<asp:Repeater id="quesr" runat="server">
.....
</asp:Repeater>

See anything... or need anymore detail?

[conehead]
 
Step through the code and see how many rows are in "quesDS.Tables["table"]"


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Something screwy is happening... I can not get anything returned... ok here is a bigger picture:
Code:
if (!IsPostBack) {


} else {
    <script language="C#">
      testLabel.Text="rows = ";

    </script>
    <asp:Label id="testLabel" runat="Server">Am I here?</asp:Label>
}

When I view this code it says: "Am I here?" Shouldn't it be set to "rows = " It seems like the stuff in the script tag is not affecting the stuff outside of it....


[conehead]
 
It looks as though you are mixing ASP.NET code inline like classic ASP and I can't see how that would work.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
See my thinking is off... my problem revolves around the fact that I could not get a form to submit to another page it always submits back (via the action) to the same page... which is why I put in the if (!IsPostback) {... is there a way to get a form to go to anther page?

[conehead]
 
In ASP.NET 2.0 there is cross posting, in 1.1 there is not. If you are using 1.1 or 1.0, then try using Server.Transfer. Or, pass values in a querystring or session variables.

Jim
 
I think my problem was that I had two void Page_load's...

[conehead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top