473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Panel

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?

Jan 21 '07 #1
1 1056
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!!!
rn**@rediffmail.com wrote:
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?
Jan 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fabrizio | last post by:
Hi, There is any chance to insert a control like a text box in a panel choosing the absolute position? When I try to insert a label , the panel positions the control on a locked position. Thanks...
9
by: Bill Long | last post by:
I have a control that simply displays a list of links. Following one of the links doesn't post back or redirect to another page, it simply hides the current panel and shows the one you selected......
2
by: Peteroid | last post by:
When the application I'm working on is run it creates a panel with a Paint event customized to draw primitives (circles, rectangles, etc.), places the panel on a form, and then launches the form....
1
by: clintonG | last post by:
I'm having a problem maintaining state with a Panel control in a MasterPage and I need help thinking through this process. The basic structure of the HTML in the Master looks like this... ...
3
by: John Salerno | last post by:
I'm using the sample code of the file 'simple.py' and trying to make a single window with a panel in it, but I keep getting an error. Here's my code: (I know I might need something else, like a...
10
by: markwalker84 | last post by:
Hello everyone! Got a bit of a problem... Two of the panels on my program contain a number of check boxes. The exact number of which is determined by a pair of variables. I have recently...
8
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm trying to figure out how to modify a panel (panel1) from a backgroundworker thread. But can't get the panel to show the new controls added by the backgroundwork task. Here is my code. In...
11
by: dongarbage | last post by:
Hi there, I'm very much a C# novice. How do you do freehand drawing on a panel with a mouse in c#? Thanks, Don
3
by: zhaodapu | last post by:
I derived a panel class: public class DeskPanel : System.Windows.Forms.Panel Now I want to use the visual designer to add controls in MyPanel class. But I noticed that the visual designer...
3
by: Gandalf | last post by:
why when I try to insert gridSizer to a panel which already inside another panel the gridSizer doesn't work? this is the code: panel3= wx.Panel(self, -1, (0, 60), size=(400, 240) ,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.