468,773 Members | 2,338 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,773 developers. It's quick & easy.

Panels: To Cor Ligthert or anybody that might help me with this.Thank You.

Hi Cor and everybody else,

i created a page with 5 panels and 5 buttons which control them acording to
Cor's help.

After this i used 5 image buttons instead of standard buttons.

When i run the page i don't get any error but at the same time i don't see
anything.
I am doing something wrong here. Can you, Cor, or somebody else point me
what is wrong?

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 visitor is.

Just paste the following code in an empty page and you will have exactly
what i have:

<%@ 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>

Nov 20 '05 #1
1 1022
Hi Miguel,

First, please do not call my name in the message, I will follow up when I
see it and can answer it.

I have already putted my answer in the original thread before I saw this.

Cor
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by PZ | last post: by
reply views Thread by PZ | last post: by
16 posts views Thread by Miguel Dias Moura | last post: by
1 post views Thread by Sunshine | last post: by
4 posts views Thread by A. Haeser | last post: by
reply views Thread by ania1984 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.