Re: about UserControl Visible property
From: Eliyahu Goldin (removemeegoldin_at_monarchmed.com)
Date: 06/20/04
- Next message: Ammar: "ASP.NET VB"
- Previous message: Rocky Moore: "Re: replace URL and redirect"
- In reply to: Edward: "Re: about UserControl Visible property"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 20 Jun 2004 11:19:50 +0200
Edward,
Make sure ctlList has any data to show on the postbacl. If it is databound,
do you re-bind it again on the postback?
Eliyahu
"Edward" <zishi@citiz.net> wrote in message
news:OOd101hVEHA.716@TK2MSFTNGP11.phx.gbl...
> I did . below is my code:
>
> void Page_Load(Object Sender, EventArgs e) {
> if (Page.IsPostBack == false) {
> ctlList.Visible = false;
> }
> }
>
> void btnGenerateInvoice_Click( Object Sender, EventArgs e ) {
> ctlList.Visible = true;
> }
>
> > On Sat, 19 Jun 2004 23:07:36 +0800, "Edward" <zishi@citiz.net> wrote:
> >
> > >hi, everyone,
> > >
> > > I've one user control "ctlList" , and one button "View" in the Page,
in
> > >the Page_Load event, I set the ctlList.Visible to false, then in the
> View's
> > >click event, I set it to true.
> > >
> > > But the result is when Load , it's really invisible, but Click didn't
> make
> > >it visible.
> > >
> > > where's my fault?
> > >
> > >Edward
> > >
> >
> > perhaps you didn't put the ctlList.Visible = false inside a postback
> > check (ie
> > if not ispostback then
> > ctlList.Visible = false
> > end if
> > )
> >
> > if so then regardless of what happens in the onclick it still sets it
> > to false when the page loads.
> >
> > hth,
> > Brian
>
>
- Next message: Ammar: "ASP.NET VB"
- Previous message: Rocky Moore: "Re: replace URL and redirect"
- In reply to: Edward: "Re: about UserControl Visible property"
- Messages sorted by: [ date ] [ thread ]