[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

ASP.Net and client side control (SelectedIndexChanged

geordie.teicher

8/29/2003 3:36:00 PM

I was wondering what capabilities ASP.Net has at the client level.

I have been using a RadioButtonList.

My control and additional textboxes look like this:

o See item number [ ]
o See items from Date [ ] to date [ ]

I have the method defined for SelectedIndexChanged event. Basically,
I am trying to clear and disable the text selections for the
unselected item.

Example:

private void RadioButtonList1_SelectedIndexChanged(object sender,
System.EventArgs e)
{

if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber")
{

txtFromDate.Text = "";
txtToDate.Text = "";
txtFromDate.Enabled = false;
txtToDate.Enabled = false;
txtItemNumber.Enabled = true;

}
}

The problem is that my SelectedIndexChanged event does not fire until
the post. I can set the AutoPost=True, but this is still doing a
post. That seems like a lot of traffic (back to the server and
running code again, etc) just to disable some client level fields. I
should be able to do this all on the client because the server does
not need to know this information.

Well, I could fall back by writing some JScript to do this for me, but
I thought there would be a native way for ASP.Net to handle this.

Does anyone have any ideas?

Thanks in advance!
3 Answers

Vaibhav

8/29/2003 4:33:00 PM

0

If you dont want to post back then, client side JScript is the only option
you have.

"Geordie" <geordie.teicher@abboptical.com> wrote in message
news:73b5ffcf.0308290735.2eac298a@posting.google.com...
> I was wondering what capabilities ASP.Net has at the client level.
>
> I have been using a RadioButtonList.
>
> My control and additional textboxes look like this:
>
> o See item number [ ]
> o See items from Date [ ] to date [ ]
>
> I have the method defined for SelectedIndexChanged event. Basically,
> I am trying to clear and disable the text selections for the
> unselected item.
>
> Example:
>
> private void RadioButtonList1_SelectedIndexChanged(object sender,
> System.EventArgs e)
> {
>
> if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber")
> {
>
> txtFromDate.Text = "";
> txtToDate.Text = "";
> txtFromDate.Enabled = false;
> txtToDate.Enabled = false;
> txtItemNumber.Enabled = true;
>
> }
> }
>
> The problem is that my SelectedIndexChanged event does not fire until
> the post. I can set the AutoPost=True, but this is still doing a
> post. That seems like a lot of traffic (back to the server and
> running code again, etc) just to disable some client level fields. I
> should be able to do this all on the client because the server does
> not need to know this information.
>
> Well, I could fall back by writing some JScript to do this for me, but
> I thought there would be a native way for ASP.Net to handle this.
>
> Does anyone have any ideas?
>
> Thanks in advance!


Kevin Spencer

8/29/2003 5:03:00 PM

0

Another option is to use HTML Radio Buttons.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.ta...
Big Things are made up of
Lots of Little Things.

"Vaibhav" <consultvaibhav@yahoo.com> wrote in message
news:ewegmskbDHA.2820@tk2msftngp13.phx.gbl...
> If you dont want to post back then, client side JScript is the only
option
> you have.
>
> "Geordie" <geordie.teicher@abboptical.com> wrote in message
> news:73b5ffcf.0308290735.2eac298a@posting.google.com...
> > I was wondering what capabilities ASP.Net has at the client level.
> >
> > I have been using a RadioButtonList.
> >
> > My control and additional textboxes look like this:
> >
> > o See item number [ ]
> > o See items from Date [ ] to date [ ]
> >
> > I have the method defined for SelectedIndexChanged event. Basically,
> > I am trying to clear and disable the text selections for the
> > unselected item.
> >
> > Example:
> >
> > private void RadioButtonList1_SelectedIndexChanged(object sender,
> > System.EventArgs e)
> > {
> >
> > if (RadioButtonList1.SelectedValue.ToString() == "ItemNumber")
> > {
> >
> > txtFromDate.Text = "";
> > txtToDate.Text = "";
> > txtFromDate.Enabled = false;
> > txtToDate.Enabled = false;
> > txtItemNumber.Enabled = true;
> >
> > }
> > }
> >
> > The problem is that my SelectedIndexChanged event does not fire until
> > the post. I can set the AutoPost=True, but this is still doing a
> > post. That seems like a lot of traffic (back to the server and
> > running code again, etc) just to disable some client level fields. I
> > should be able to do this all on the client because the server does
> > not need to know this information.
> >
> > Well, I could fall back by writing some JScript to do this for me, but
> > I thought there would be a native way for ASP.Net to handle this.
> >
> > Does anyone have any ideas?
> >
> > Thanks in advance!
>
>


pyotr filipivich

6/9/2012 5:57:00 PM

0

Let the Record show that Gray Guest <No_email_for_you@wahoo.com> on or
about Sat, 9 Jun 2012 17:08:19 +0000 (UTC) did write, type or
otherwise cause to appear in talk.politics.guns the following:
>1treePetrifiedForestLane <Space998@hotmail.com> wrote in news:0f21ebe2-
>d1a6-42b8-a68e-52a3c7e390f3@d6g2000pbt.googlegroups.com:
>
>> well, that seems about par, if silly with the phraseology
>> of "alarmist computerized simulacra."
>>
>> where Miskolczi goes to far, is the same as witht eh modelers,
>> ignoring the vast transfromations taht are *powered*
>> by the creation of this minor glass house gas
>> (the gist of which is in the tiny absorptive spectrum,
>> compared to water vapor .-)
>>
>>> Examiner.com: Has there been global warming?
>>> Dr. Miskolczi: No one is denying that global warming has taken place,
>but
>>> it has nothing to do with the greenhouse effect or the burning of fossil
>>> fuels.
>>> read more ?
>>
>> note that the energy cartels have trained everyone
>> to believe in "fossilized fuelsTM."
>>
>
>Why don't you and the other raving loons, instead of trying to destroy
>modern society, go to advanced engineering schools, get an education and
>invent something better?
>
>Because right now today, there is NO better source of energy, particularly
>for transportation. It is relztively small and compact, transports easily
>and relatively safely and has a good ratio of useable enrgy to volume.
>
>There is nothing else comparable in any quantity. And affordable.
>
>Why doncha design something better?

With a nym like "1treePetrifiedForestLane" you're expecting him to
be able to make critical judgments?

Maybe we can sell coal to him as "petrified wood". Or sell him
petrified wood for his eco-friendly stove?
--
pyotr filipivich
Next Month's Panel: Suicide - getting it right the first time.