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
anel ID="pnlDataEntry" runat="server">
<%-- here comes the TextBoxes & the Button --%>
</asp
anel>
<asp
anel ID="pnlSummary" runat="server">
<%-- here comes the Repeater --%>
</asp
anel>
</form>
Any idea where I could be erring?
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
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
<%-- here comes the TextBoxes & the Button --%>
</asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
<asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
<%-- here comes the Repeater --%>
</asp
![Stick Out Tongue :P :P](/styles/default/custom/smilies/tongue.gif)
</form>
Any idea where I could be erring?