Re: about UserControl Visible property
From: Edward (zishi_at_citiz.net)
Date: 06/19/04
- Next message: Ian: "Re: Ideas for changing CSS on fly?"
- Previous message: Phil Winstanley [Microsoft MVP ASP.NET]: "Re: Server Error in '/' Application"
- In reply to:(deleted message) Brian: "Re: about UserControl Visible property"
- Next in thread: Eliyahu Goldin: "Re: about UserControl Visible property"
- Reply: Eliyahu Goldin: "Re: about UserControl Visible property"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 20 Jun 2004 00:48:43 +0800
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: Ian: "Re: Ideas for changing CSS on fly?"
- Previous message: Phil Winstanley [Microsoft MVP ASP.NET]: "Re: Server Error in '/' Application"
- In reply to:(deleted message) Brian: "Re: about UserControl Visible property"
- Next in thread: Eliyahu Goldin: "Re: about UserControl Visible property"
- Reply: Eliyahu Goldin: "Re: about UserControl Visible property"
- Messages sorted by: [ date ] [ thread ]