Question

G

Guest

Hi Guys,

I have a strange situation in my code. I have a linkbutton which is supposed
to set the panel visibility to true. I have to click the button three times
in order for the panel to be visible.

Can some one tell me what is going on and how it can be fixed?

Thanks

Manny
 
C

Curt_C [MVP]

Manny said:
Hi Guys,

I have a strange situation in my code. I have a linkbutton which is supposed
to set the panel visibility to true. I have to click the button three times
in order for the panel to be visible.

Can some one tell me what is going on and how it can be fixed?

Thanks

Manny

show the event code
 
G

Guest

Private Sub lbtnShowEmailed_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles lbtnShowEmailed.Click
Try


Dim ucApprover As UserControl
Dim pnlEmail As Panel
Dim pnlPend As Panel
Dim pnlApr As Panel
ucApprover = Me.FindControl("approver_uc")
pnlEmail = ucApprover.FindControl("pnlEmailed")
pnlPend = ucApprover.FindControl("pnlApproved")
pnlApr = ucApprover.FindControl("pnlPending")
pnlEmail.Visible = True
pnlPend.Visible = False
pnlApr.Visible = False
lbtnShowEmailed.Visible = False
lbtnPend_Aproved.Visible = True
Catch ex As Exception
Response.Write(ex.Message)
Response.Write("<BR>" + ex.StackTrace)
End Try
 
C

Curt_C [MVP]

Manny said:
Private Sub lbtnShowEmailed_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles lbtnShowEmailed.Click
Try


Dim ucApprover As UserControl
Dim pnlEmail As Panel
Dim pnlPend As Panel
Dim pnlApr As Panel
ucApprover = Me.FindControl("approver_uc")
pnlEmail = ucApprover.FindControl("pnlEmailed")
pnlPend = ucApprover.FindControl("pnlApproved")
pnlApr = ucApprover.FindControl("pnlPending")
pnlEmail.Visible = True
pnlPend.Visible = False
pnlApr.Visible = False
lbtnShowEmailed.Visible = False
lbtnPend_Aproved.Visible = True
Catch ex As Exception
Response.Write(ex.Message)
Response.Write("<BR>" + ex.StackTrace)
End Try



:

Is the page load doing anything to hide it? Wonder if there is something
else overwritting the settings.....
 

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

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top