Re: CheckBox CheckChanged EventHandler not working?
From: R Reyes (RReyes_at_discussions.microsoft.com)
Date: 09/09/04
- Next message: R Reyes: "Re: CheckBox CheckChanged EventHandler not working?"
- Previous message: Mark: "Re: Remoting and calling functions in another class"
- In reply to: Trebek: "Re: CheckBox CheckChanged EventHandler not working?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 14:47:02 -0700
Oh really? That stinks. I'm not expecting high traffic but I didn't realize
you had to have a page submit for a function as easy as this to work. Ugh, I
was hoping I wouldn't need to have any client side scripting. I didn't
really want to use javascript/vbscript. I like handling everything in
c#...at least ever since i've converted. And I guess it was assuming too
much that an event handler would be able to change stuff on a webform w/o the
need to submit. But...I guess that does make sense.
Thanks Trebek. And if anyone has any other ideas besides client-side
scripting, I'm all ears.
"Trebek" wrote:
> You have to set the 'AutoPostBack' property to true in order to have your
> event fire. Of course, this will cause a post back so you might wanna think
> about client-side script instead if you expect high traffic.
>
> HTH,
>
> Alex
>
>
>
> "R Reyes" <RReyes@discussions.microsoft.com> wrote in message
> news:BAD1ED83-3655-4E5E-9208-B322691D9F76@microsoft.com...
> > I have a login page with two checkboxes, one for automatic login and the
> > other for remember username. When automatic login is checked, I simply
> want
> > the remember username checkbox to be checked too, but the eventhandler is
> > NEVER executed. do i need to create a different type of event handler?
> >
> > Here is my code:
> > CheckBox cb = new CheckBox();
> > cb.ID = "myCheckBox";
> > cb.Text = "Remember Username";
> > cb.CheckedChanged += new System.EventHandler(this.cb_CheckedChanged);
> >
> > // this is never executed
> > private void cb_CheckedChanged(object sender, EventArgs e) {
> > Response.Write ("WE ARE HERE...AWESOME!!!!");
> > cbUserNameRemember.Checked = true;
> > }
> >
> > please help. thanks in advance.
>
>
>
>
- Next message: R Reyes: "Re: CheckBox CheckChanged EventHandler not working?"
- Previous message: Mark: "Re: Remoting and calling functions in another class"
- In reply to: Trebek: "Re: CheckBox CheckChanged EventHandler not working?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|