473,406 Members | 2,619 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,406 software developers and data experts.

Make panels visible and invisible.

Hello,

i have 5 panels in an ASP.net / VB page.
The panel 1 is visible the other 4 are NOT visible.

I also have 5 images: image 1, image 2, ..., image5.

When i click one of the images, image N, the panel N becomes visible and
all the other invisible.

Can you tell me how shoudl the script be and how should be the image code
be?

Thank You,
Miguel
Nov 20 '05 #1
16 11471
Hi Miguel.

You multipost in a lot of groups and does not follow up your previous
messages, do you want to be so kind to crosspost next time, than we can see
what where the answers in the other groups.

crossposting sending one message to more newsgroups with a comma to seperate
them.

Thanks,

Cor
Nov 20 '05 #2
Hi Miguel,

I assume that where as well the other questions,

Here a sample how to do what you ask.

I hope this helps?

Cor
\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Select Case viewstate.Item("T")
Case 1
Panel1.Visible = True
Case 2
Panel2.Visible = True
Case 3
Panel3.Visible = True
Case 4
Panel4.Visible = True
Case 5
Panel5.Visible = True
viewstate.Item("T") = 0
End Select
viewstate.Item("T") = CInt(viewstate.Item("T")) + 1
End Sub
///
Nov 20 '05 #3
Hi Cor,

i allways have problems in making things work when this Handles... is used.
Have no idea why.

I have been looking at ASP.net scripts for a month. I know i am just
starting but everytime someone helps me out and sends me some code like this
i end up hitting my head in the walls :-)

Could you send me a simple ASP.net file with 2 panels, 2 images and this
code, so i can check how is this implemented.
If you can send it to me please use my email but take the NoSpam from the
address.

Thank You,
Miguel

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:#b**************@tk2msftngp13.phx.gbl...
Hi Miguel,

I assume that where as well the other questions,

Here a sample how to do what you ask.

I hope this helps?

Cor
\\\
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Select Case viewstate.Item("T")
Case 1
Panel1.Visible = True
Case 2
Panel2.Visible = True
Case 3
Panel3.Visible = True
Case 4
Panel4.Visible = True
Case 5
Panel5.Visible = True
viewstate.Item("T") = 0
End Select
viewstate.Item("T") = CInt(viewstate.Item("T")) + 1
End Sub
///

Nov 20 '05 #4
Hi Miguel,

Most people in this vb.language newsgroup are using Visual Studio Net and
with that they got compiled programs. However it can as well with scripting,
I did not do this for a while, however try this one.

You can paste it in an empty sample1.aspx

I hope it helps?

Cor

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Select Case viewstate.Item("T")
Case 1
Panel1.Visible = True
Case 2
Panel2.Visible = True
Case 3
Panel3.Visible = True
Case 4
Panel4.Visible = True
Case 5
Panel5.Visible = True
viewstate.Item("T") = 0
End Select
viewstate.Item("T") = CInt(viewstate.Item("T")) + 1
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<TABLE height="533" cellSpacing="0" cellPadding="0" width="490" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="490" height="533">
<form id="Form1" method="post" runat="server">
<TABLE height="473" cellSpacing="0" cellPadding="0" width="521" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="360" height="96"></TD>
<TD width="48"></TD>
<TD width="113"></TD>
</TR>
<TR vAlign="top">
<TD colSpan="2" height="32"></TD>
<TD>
<asp:Button text="Button" OnClick="Button1_Click" runat="server"
ID="Button1"></asp:Button></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double">Panel
<asp:Label id="Label1" runat="server"
Width="64px">1</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="57"></TD>
<TD colSpan="2">
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel></TD>
</TR>
</TABLE>
</form>
</TD>
</TR>
</TABLE>
</body>
</HTML>
i allways have problems in making things work when this Handles... is used. Have no idea why.

I have been looking at ASP.net scripts for a month. I know i am just
starting but everytime someone helps me out and sends me some code like this i end up hitting my head in the walls :-)

Could you send me a simple ASP.net file with 2 panels, 2 images and this
code, so i can check how is this implemented.
If you can send it to me please use my email but take the NoSpam from the
address.

Thank You,
Miguel

Nov 20 '05 #5
Hi,

i tryied it but it doesn't work. I tryied to make some changes but nothing
happens.

Miguel

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Hi Miguel,

Most people in this vb.language newsgroup are using Visual Studio Net and
with that they got compiled programs. However it can as well with scripting, I did not do this for a while, however try this one.

You can paste it in an empty sample1.aspx

I hope it helps?

Cor

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Select Case viewstate.Item("T")
Case 1
Panel1.Visible = True
Case 2
Panel2.Visible = True
Case 3
Panel3.Visible = True
Case 4
Panel4.Visible = True
Case 5
Panel5.Visible = True
viewstate.Item("T") = 0
End Select
viewstate.Item("T") = CInt(viewstate.Item("T")) + 1
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<TABLE height="533" cellSpacing="0" cellPadding="0" width="490" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="490" height="533">
<form id="Form1" method="post" runat="server">
<TABLE height="473" cellSpacing="0" cellPadding="0" width="521" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="360" height="96"></TD>
<TD width="48"></TD>
<TD width="113"></TD>
</TR>
<TR vAlign="top">
<TD colSpan="2" height="32"></TD>
<TD>
<asp:Button text="Button" OnClick="Button1_Click" runat="server"
ID="Button1"></asp:Button></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double">Panel
<asp:Label id="Label1" runat="server"
Width="64px">1</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="57"></TD>
<TD colSpan="2">
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel></TD>
</TR>
</TABLE>
</form>
</TD>
</TR>
</TABLE>
</body>
</HTML>
i allways have problems in making things work when this Handles... is

used.
Have no idea why.

I have been looking at ASP.net scripts for a month. I know i am just
starting but everytime someone helps me out and sends me some code like

this
i end up hitting my head in the walls :-)

Could you send me a simple ASP.net file with 2 panels, 2 images and this
code, so i can check how is this implemented.
If you can send it to me please use my email but take the NoSpam from the address.

Thank You,
Miguel


Nov 20 '05 #6
Hi Cor,

i have a script i have been using which changes from one panel to the next
or previous one using "Previous" and "Next" buttons.
Can you help me in changing this code to change the panels using the 5
images as buttons as i described before...

Maybe it's a better idea.

Thank You,
Miguel

Here is the code:

<script runat="Server">

Sub Page_Load
If Not IsPostBack Then
ViewState( "CurrentPage" ) = 1
End If
End Sub

Sub btnNextPage_Click( s As Object, e As EventArgs )
Dim pnlPanel As Panel
Dim strPanelName AS String

' Hide Previous Panel
strPanelName = "panelSubscribe" & ViewState( "CurrentPage" )
pnlPanel = FindControl( strPanelName )
pnlPanel.Visible = False

' Show Current Panel
ViewState( "CurrentPage" ) += 1
strPanelName = "panelSubscribe" & ViewState( "CurrentPage" )
pnlPanel = FindControl( strPanelName )
pnlPanel.Visible = True

End Sub

Sub btnPrevPage_Click( s As Object, e As EventArgs )
Dim pnlPanel As Panel
Dim strPanelName AS String

' Hide Current Panel
strPanelName = "panelSubscribe" & ViewState( "CurrentPage" )
pnlPanel = FindControl( strPanelName )
pnlPanel.Visible = False

' Show Previous Panel
ViewState( "CurrentPage" ) -= 1
strPanelName = "panelSubscribe" & ViewState( "CurrentPage" )
pnlPanel = FindControl( strPanelName )
pnlPanel.Visible = True

End Sub

Sub btnFinish_Click( s As Object, e As EventArgs )
Take some action End Sub

</script>

"Miguel Dias Moura" <we****@27NOSPAMlamps.com> wrote in message
news:O#**************@TK2MSFTNGP11.phx.gbl...
Hi,

i tryied it but it doesn't work. I tryied to make some changes but nothing
happens.

Miguel

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OI**************@TK2MSFTNGP09.phx.gbl...
Hi Miguel,

Most people in this vb.language newsgroup are using Visual Studio Net and with that they got compiled programs. However it can as well with

scripting,
I did not do this for a while, however try this one.

You can paste it in an empty sample1.aspx

I hope it helps?

Cor

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Select Case viewstate.Item("T")
Case 1
Panel1.Visible = True
Case 2
Panel2.Visible = True
Case 3
Panel3.Visible = True
Case 4
Panel4.Visible = True
Case 5
Panel5.Visible = True
viewstate.Item("T") = 0
End Select
viewstate.Item("T") = CInt(viewstate.Item("T")) + 1
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<TABLE height="533" cellSpacing="0" cellPadding="0" width="490" border="0" ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="490" height="533">
<form id="Form1" method="post" runat="server">
<TABLE height="473" cellSpacing="0" cellPadding="0" width="521" border="0" ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="360" height="96"></TD>
<TD width="48"></TD>
<TD width="113"></TD>
</TR>
<TR vAlign="top">
<TD colSpan="2" height="32"></TD>
<TD>
<asp:Button text="Button" OnClick="Button1_Click" runat="server"
ID="Button1"></asp:Button></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double">Panel
<asp:Label id="Label1" runat="server"
Width="64px">1</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="57"></TD>
<TD colSpan="2">
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel></TD>
</TR>
</TABLE>
</form>
</TD>
</TR>
</TABLE>
</body>
</HTML>
i allways have problems in making things work when this Handles... is

used.
Have no idea why.

I have been looking at ASP.net scripts for a month. I know i am just
starting but everytime someone helps me out and sends me some code like
this
i end up hitting my head in the walls :-)

Could you send me a simple ASP.net file with 2 panels, 2 images and

this code, so i can check how is this implemented.
If you can send it to me please use my email but take the NoSpam from

the address.

Thank You,
Miguel



Nov 20 '05 #7
Hi Miguel,

I tested this, this did work, what is not working?

Cor

i tryied it but it doesn't work. I tryied to make some changes but nothing
happens.

Nov 20 '05 #8
Hi Cor,

you are right, it's working...i did a mistake when i pasted the code.

However it's not working as i need to make it work.
It has a button and when i click the button the next panel becomes visible
and the previous one becomes invisible.

However, what i want to to have 5 buttons. Each one associated to a panel.
When i press button1, panel1 becomes visible and the one that was visible
becomes invisible, see?

I was looking at you code and trying to changing to make it this happen but
until now i wasn't able to do it.

Can you give me some tips?

Thank You,
Miguel

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uH**************@TK2MSFTNGP11.phx.gbl...
Hi Miguel,

I tested this, this did work, what is not working?

Cor

i tryied it but it doesn't work. I tryied to make some changes but nothing happens.


Nov 20 '05 #9
> you are right, it's working...i did a mistake when i pasted the code.

However it's not working as i need to make it work.
It has a button and when i click the button the next panel becomes visible
and the previous one becomes invisible.

However, what i want to to have 5 buttons. Each one associated to a panel.
When i press button1, panel1 becomes visible and the one that was visible
becomes invisible, see?


That is even simpler, I did not test it, I change it here in the code
bellow. So watch typos, the buttons are as well not so nice alligned, they
would be probably side by side.

I hope this helps?

Cor
<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel1.Visible = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel2.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel3.Visible = True
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel4.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel5.Visible = True
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<TABLE height="533" cellSpacing="0" cellPadding="0" width="490" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="490" height="533">
<form id="Form1" method="post" runat="server">
<TABLE height="473" cellSpacing="0" cellPadding="0" width="521" border="0"
ms_2d_layout="TRUE">
<TR vAlign="top">
<TD width="360" height="96"></TD>
<TD width="48"></TD>
<TD width="113"></TD>
</TR>
<TR vAlign="top">
<TD colSpan="2" height="32"></TD>
<TD>
<asp:Button text="Button1" OnClick="Button1_Click" runat="server"
ID="Button1"></asp:Button>
<asp:Button text="Button2" OnClick="Button2_Click" runat="server"
ID="Button1"></asp:Button>
<asp:Button text="Button3" OnClick="Button3_Click" runat="server"
ID="Button1"></asp:Button>
<asp:Button text="Button4" OnClick="Button4_Click" runat="server"
ID="Button1"></asp:Button>
<asp:Button text="Button5" OnClick="Button5_Click" runat="server"
ID="Button1"></asp:Button>
</TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double">Panel
<asp:Label id="Label1" runat="server"
Width="64px">1</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="72"></TD>
<TD colSpan="2">
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel></TD>
</TR>
<TR vAlign="top">
<TD height="57"></TD>
<TD colSpan="2">
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel></TD>
</TR>
</TABLE>
</form>
</TD>
</TR>
</TABLE>
</body>
</HTML>


Nov 20 '05 #10
Hi Miguel,

I used a button, however you can of course as well use an imagebutton.
That goes the same.

http://msdn.microsoft.com/library/de...classtopic.asp

I hope this helps?

Cor
Nov 20 '05 #11
Hi,

thanks for that image information. That's what i was looking for.
About the code you are sending me i am getting an error:

Line 6: <script language="VB" runat="server">
Line 7:
Line 8: Private Sub Page_Load(ByVal sender As System.Object, _ByVal e As
System.EventArgs)
Line 9:
Line 10: If Not IsPostBack Then

* These are the first lines in the script as displayed after.

I only made a correction to the code as the ID's of the buttons were all the
same. I didn't change anything in the script:

<script language="VB" runat="server">

Private Sub Page_Load(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

If Not IsPostBack Then
viewstate.Item("T") = 1
End If

Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control

For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

Panel1.Visible = True

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

Panel2.Visible = True

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

Panel3.Visible = True

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

Panel4.Visible = True

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, _ByVal e As
System.EventArgs)

Panel5.Visible = True

End Sub

</script>
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
Hi Miguel,

I used a button, however you can of course as well use an imagebutton.
That goes the same.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwebuiwebcontrolsimagebuttonclasstopic.a sp
I hope this helps?

Cor

Nov 20 '05 #12
P.S: the error is: BC30529: All parameters must be explicitly typed if any
are.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uz**************@tk2msftngp13.phx.gbl...
Hi Miguel,

I used a button, however you can of course as well use an imagebutton.
That goes the same.

http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwebuiwebcontrolsimagebuttonclasstopic.a sp
I hope this helps?

Cor

Nov 20 '05 #13
Hi Miquel,

thanks for that image information. That's what i was looking for.
About the code you are sending me i am getting an error:

That row that you gives an error on 6 is with me on row 4, the buttons
where not nice alligned however after doing that and I tested it, did work
again as I expected.

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel1.Visible = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel2.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel3.Visible = True
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel4.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel5.Visible = True
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button text="Button1" OnClick="Button1_Click" runat="server"
ID="Button1" style="LEFT: 232px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button2" OnClick="Button2_Click" runat="server"
ID="Button2" style="LEFT: 304px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button3" OnClick="Button3_Click" runat="server"
ID="Button3" style="LEFT: 376px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button4" OnClick="Button4_Click" runat="server"
ID="Button4" style="LEFT: 448px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button5" OnClick="Button5_Click" runat="server"
ID="Button5" style="LEFT: 528px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double" style="LEFT: 360px; POSITION: absolute; TOP:
128px">Panel
<asp:Label id="Label1" runat="server" Width="64px">1</asp:Label></asp:Panel>
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted" style="LEFT: 360px; POSITION: absolute; TOP:
200px">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel>
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge" style="LEFT: 360px; POSITION: absolute; TOP:
272px">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel>
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset" style="LEFT: 360px; POSITION: absolute; TOP:
344px">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel>
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid" style="LEFT: 360px; POSITION: absolute; TOP:
416px">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel>
</form>
</body>
</HTML>
Nov 20 '05 #14
Hi,

it's working fine now. Maybe there is something wrong going on with the way
i am creating the files in Dreamweaver.
Anyway, now everything is working very well.

Thank You Very Much for your help and patiente,
Miguel

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:Ot**************@TK2MSFTNGP09.phx.gbl...
Hi Miquel,

thanks for that image information. That's what i was looking for.
About the code you are sending me i am getting an error:
That row that you gives an error on 6 is with me on row 4, the buttons
where not nice alligned however after doing that and I tested it, did

work again as I expected.

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel1.Visible = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel2.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel3.Visible = True
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel4.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel5.Visible = True
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button text="Button1" OnClick="Button1_Click" runat="server"
ID="Button1" style="LEFT: 232px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button2" OnClick="Button2_Click" runat="server"
ID="Button2" style="LEFT: 304px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button3" OnClick="Button3_Click" runat="server"
ID="Button3" style="LEFT: 376px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button4" OnClick="Button4_Click" runat="server"
ID="Button4" style="LEFT: 448px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button5" OnClick="Button5_Click" runat="server"
ID="Button5" style="LEFT: 528px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double" style="LEFT: 360px; POSITION: absolute; TOP:
128px">Panel
<asp:Label id="Label1" runat="server" Width="64px">1</asp:Label></asp:Panel> <asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted" style="LEFT: 360px; POSITION: absolute; TOP:
200px">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel>
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge" style="LEFT: 360px; POSITION: absolute; TOP:
272px">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel>
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset" style="LEFT: 360px; POSITION: absolute; TOP:
344px">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel>
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid" style="LEFT: 360px; POSITION: absolute; TOP:
416px">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel>
</form>
</body>
</HTML>

Nov 20 '05 #15
Hello Cor,

one more problem: i just created the page as i want to work with the code
you sent me and the image buttons as the page in Microsoft.

When i run it i don't get any error but no panel or button is visible.
The reason why i have several sets of buttons is because in each panel there
is an image which is not a button but only an image with the different color
which i call image-hit.gif, indicating in which section the person is.

Can you check what am i doing wrong here? See the page code in the botton
please.

Thank

My entire page code is:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<script language="VB" runat="server">

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)

If Not IsPostBack Then
viewstate.Item("T") = 1
End If

Dim frm As Control = Me.FindControl("formDados")
Dim ctl As Control

For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados1.Visible = True

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados2.Visible = True

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados3.Visible = True

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados4.Visible = True

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados5.Visible = True

End Sub

</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="css/bonsAlunosStyles.css" rel="stylesheet" type="text/css">
</head>
<body>
<form id="formDados" method="post" runat="server">
<asp:Panel ID="panelDados1" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="image/button-ensino-hit.gif" width="49"
height="18"></td>
<td><asp:ImageButton ID="button2Panel1"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel1"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel1"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel1"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 01</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados2" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel2"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><img src="image/button-curriculum-vitae-hit.gif"
width="105" height="18"></td>
<td><asp:ImageButton ID="button3Panel2"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel2"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel2"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 02</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados3" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel3"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel3"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><img src="image/button-localizacao-hit.gif" width="76"
height="18"></td>
<td><asp:ImageButton ID="button4Panel3"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel3"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 03</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados4" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel4"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel4"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel4"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><img src="image/button-documentos-publicados-hit.gif"
width="145" height="18"></td>
<td><asp:ImageButton ID="button5Panel4"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 04</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados5" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel5"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel5"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel5"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel5"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><img src="image/button-contacte-me-hit.gif" width="75"
height="18"></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 05</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
</form>
</body>
</html>

Can you tell me what is going on?
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:Ot**************@TK2MSFTNGP09.phx.gbl...
Hi Miquel,

thanks for that image information. That's what i was looking for.
About the code you are sending me i am getting an error:
That row that you gives an error on 6 is with me on row 4, the buttons
where not nice alligned however after doing that and I tested it, did

work again as I expected.

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel1.Visible = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel2.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel3.Visible = True
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel4.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel5.Visible = True
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button text="Button1" OnClick="Button1_Click" runat="server"
ID="Button1" style="LEFT: 232px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button2" OnClick="Button2_Click" runat="server"
ID="Button2" style="LEFT: 304px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button3" OnClick="Button3_Click" runat="server"
ID="Button3" style="LEFT: 376px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button4" OnClick="Button4_Click" runat="server"
ID="Button4" style="LEFT: 448px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button5" OnClick="Button5_Click" runat="server"
ID="Button5" style="LEFT: 528px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double" style="LEFT: 360px; POSITION: absolute; TOP:
128px">Panel
<asp:Label id="Label1" runat="server" Width="64px">1</asp:Label></asp:Panel> <asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted" style="LEFT: 360px; POSITION: absolute; TOP:
200px">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel>
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge" style="LEFT: 360px; POSITION: absolute; TOP:
272px">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel>
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset" style="LEFT: 360px; POSITION: absolute; TOP:
344px">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel>
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid" style="LEFT: 360px; POSITION: absolute; TOP:
416px">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel>
</form>
</body>
</HTML>

Nov 20 '05 #16
Hi Miguel,

You cannot push a button that is not on the form, I did not make this
completly well because for that is to much work, however you can try this.
'At the end of the load event (where you can delete that viewstate sentence
in my opinion, I forgot it to delete in my last sample from the first)
\\\
if not ispostback then
paneldados1.visible = True
End if
End Sub
'and than everytime make the next panel visible
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.Web.UI.ImageClickEventArgs)
panelDados1.Visible = True
panelDados2.visible = true
End Sub
///

one more problem: i just created the page as i want to work with the code
you sent me and the image buttons as the page in Microsoft.

When i run it i don't get any error but no panel or button is visible.
The reason why i have several sets of buttons is because in each panel there is an image which is not a button but only an image with the different color which i call image-hit.gif, indicating in which section the person is.

Can you check what am i doing wrong here? See the page code in the botton
please.

Thank

My entire page code is:

<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<script language="VB" runat="server">

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs)

If Not IsPostBack Then
viewstate.Item("T") = 1
End If

Dim frm As Control = Me.FindControl("formDados")
Dim ctl As Control

For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados1.Visible = True

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados2.Visible = True

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados3.Visible = True

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados4.Visible = True

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As
System.Web.UI.ImageClickEventArgs)

panelDados5.Visible = True

End Sub

</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<link href="css/bonsAlunosStyles.css" rel="stylesheet" type="text/css">
</head>
<body>
<form id="formDados" method="post" runat="server">
<asp:Panel ID="panelDados1" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="image/button-ensino-hit.gif" width="49"
height="18"></td>
<td><asp:ImageButton ID="button2Panel1"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel1"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel1"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel1"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 01</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados2" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel2"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><img src="image/button-curriculum-vitae-hit.gif"
width="105" height="18"></td>
<td><asp:ImageButton ID="button3Panel2"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel2"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel2"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 02</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados3" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel3"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel3"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><img src="image/button-localizacao-hit.gif" width="76"
height="18"></td>
<td><asp:ImageButton ID="button4Panel3"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><asp:ImageButton ID="button5Panel3"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 03</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados4" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel4"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel4"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel4"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><img src="image/button-documentos-publicados-hit.gif"
width="145" height="18"></td>
<td><asp:ImageButton ID="button5Panel4"
AlternateText="Contacte-me" ImageUrl="image/button-contacte-me.gif"
ToolTip="Contacte-me" OnClick="Button5_Click" runat="server" /></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 04</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
<asp:Panel ID="panelDados5" Runat="Server">
<table width="468" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="11" align="center" class="greyNoteText"></td>
<td width="457" align="left" class="greyNoteText">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><asp:ImageButton ID="button1Panel5"
AlternateText="Ensino" ImageUrl="image/button-ensino.gif" ToolTip="Ensino"
OnClick="Button1_Click" runat="server" /></td>
<td><asp:ImageButton ID="button2Panel5"
AlternateText="Curriculum Vitae"
ImageUrl="image/button-curriculum-vitae.gif" ToolTip="Curriculum Vitae"
OnClick="Button2_Click" runat="server" /></td>
<td><asp:ImageButton ID="button3Panel5"
AlternateText="Localização" ImageUrl="image/button-localizacao.gif"
ToolTip="Localização" OnClick="Button3_Click" runat="server" /></td>
<td><asp:ImageButton ID="button4Panel5"
AlternateText="Documentos Publicados"
ImageUrl="image/button-documentos-publicados.gif" ToolTip="Documentos
Publicados" OnClick="Button4_Click" runat="server" /></td>
<td><img src="image/button-contacte-me-hit.gif" width="75"
height="18"></td>
</tr>
</table>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Panel 05</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
</form>
</body>
</html>

Can you tell me what is going on?
"Cor Ligthert" <no**********@planet.nl> wrote in message
news:Ot**************@TK2MSFTNGP09.phx.gbl...
Hi Miquel,

thanks for that image information. That's what i was looking for.
About the code you are sending me i am getting an error:

That row that you gives an error on 6 is with me on row 4, the buttons
where not nice alligned however after doing that and I tested it, did

work
again as I expected.

<HTML>
<HEAD>
<title>Sample1</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
If Not IsPostBack Then
viewstate.Item("T") = 1
End If
Dim frm As Control = Me.FindControl("Form1")
Dim ctl As Control
For Each ctl In frm.Controls
If TypeOf ctl Is Panel Then
DirectCast(ctl, Panel).Visible = False
End If
Next
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel1.Visible = True
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel2.Visible = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel3.Visible = True
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel4.Visible = True
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs)
Panel5.Visible = True
End Sub
</script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:Button text="Button1" OnClick="Button1_Click" runat="server"
ID="Button1" style="LEFT: 232px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button2" OnClick="Button2_Click" runat="server"
ID="Button2" style="LEFT: 304px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button3" OnClick="Button3_Click" runat="server"
ID="Button3" style="LEFT: 376px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button4" OnClick="Button4_Click" runat="server"
ID="Button4" style="LEFT: 448px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Button text="Button5" OnClick="Button5_Click" runat="server"
ID="Button5" style="LEFT: 528px; POSITION: absolute; TOP:
48px"></asp:Button>
<asp:Panel id="Panel1" runat="server" Width="160px" Height="48px"
BorderStyle="Double" style="LEFT: 360px; POSITION: absolute; TOP:
128px">Panel
<asp:Label id="Label1" runat="server"

Width="64px">1</asp:Label></asp:Panel>
<asp:Panel id="Panel2" runat="server" Width="160px" Height="48px"
BorderStyle="Dotted" style="LEFT: 360px; POSITION: absolute; TOP:
200px">Panel
<asp:Label id="Label2" runat="server">2</asp:Label></asp:Panel>
<asp:Panel id="Panel3" runat="server" Width="160px" Height="56px"
BorderStyle="Ridge" style="LEFT: 360px; POSITION: absolute; TOP:
272px">Panel
<asp:Label id="Label3" runat="server">3</asp:Label></asp:Panel>
<asp:Panel id="Panel4" runat="server" Width="160px" Height="56px"
BorderStyle="Outset" style="LEFT: 360px; POSITION: absolute; TOP:
344px">Panel
<asp:Label id="Label4" runat="server">4</asp:Label></asp:Panel>
<asp:Panel id="Panel5" runat="server" Width="160px" Height="56px"
BorderStyle="Solid" style="LEFT: 360px; POSITION: absolute; TOP:
416px">Panel
<asp:Label id="Label5" runat="server">5</asp:Label></asp:Panel>
</form>
</body>
</HTML>


Nov 20 '05 #17

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

Similar topics

10
by: idiotprogrammer | last post by:
Hi, there, I'm trying to do something, and part of the problem is that I don't know how to describe the effect. One block will have a list of links stacked over one another and separated by p...
1
by: PCB | last post by:
Hi all, Not sure if this is possible, but can I change the controls of a command button on a per record bases in a subform. In my case, I would like to make a command button visible only if...
3
by: Susan Bricker | last post by:
Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is...
1
by: Anushya | last post by:
Hi All Is it possible to set the mailitem Visible/Invisible by setting something like flag or any other way? Now developing in .NET. Anushya
4
by: Gibs | last post by:
Hi, How can i make a label visible/invisible? I am able to do it for text box by using document.form1.TextBox1.style.visibility="hidden"; But when i am giving the same for the label, i am getting...
4
by: Miguel Dias Moura | last post by:
Hello, i have 5 panels in an ASP.net / VB page. The panel 1 is visible the other 4 are NOT visible. I also have 5 images: image 1, image 2, ..., image5. When i click one of the images,...
8
by: Roy | last post by:
What is the best way to approach this problem? I have a datagrid with an imagebutton. When one clicks the imagebutton it triggers an onClick sub which makes column 9 (a user control) visible or...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
1
by: SP | last post by:
Hello there, I have a DataList create as below. <asp:DataList ID="dl_Immunpsuppressive_Main" Runat="server" Width="100%"> <ItemTemplate> <table id="Immunpsuppressive_Main" width="100%"...
6
by: Charlie | last post by:
Hi: I have sections on a page in asp panels. I would like to hide/show using javascript, but don't see a visible property for DIV. How do you do this? Thanks, Charlie
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.