Panel

R

rn5a

A Form has 2 Panels - 'pnlDataEntry' & 'pnlSummary'. 'pnlDataEntry'
houses a table with many TextBoxes & a Button (to submit the Form).
When the Form is posted, the data in the TextBoxes are fed in a SQL
Server DB table.

'pnlSummary' houses a Repeater server control which retrieves &
displays data from the same database table after the Form is posted.

When a user comes to this ASPX page for the first time, 'pnlDataEntry'
should be visible & 'pnlSummary' should be invisible. Conversely when
the Form is posted, 'pnlDataEntry' should remain invisible &
'pnlSummary' should be visible.

It shouldn't be any problem but I don't know why 'pnlSummary' is
refusing to become visible after the Form submits i.e. after the Form
submits, all I get to see is just a blank page & nothing though the DB
table does get populated with the Form data. This is how I did it:

<script runat="server">
Sub Page_Load(..........)
If Not (Page.IsPostBack) Then
pnlDataEntry.Visible = True
pnlSummary.Visible = False
Else
pnlDataEntry.Visible = False
pnlSummary.Visible = True
End If
End Sub
</script>

<form runat="server">
<asp:panel ID="pnlDataEntry" runat="server">
<%-- here comes the TextBoxes & the Button --%>
</asp:panel>

<asp:panel ID="pnlSummary" runat="server">
<%-- here comes the Repeater --%>
</asp:panel>
</form>

Any idea where I could be erring?
 
R

rn5a

OK....OK.....I got it. I wasn't binding the Repeater with any data
source which is why the Repeater wasn't getting rendered & I wasted
about an hour thinking why was the Repeater behaving so adamantly &
refusing to show itself!

Height of stupidity!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top