ASP.NET 2.0: Are they going to fix HtmlSelect?

G

Guest

HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either
have it postback when the user changes it immediately or not do anything
when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......
 
M

mikeb

nospam said:
HtmlSelect has a method called OnServerChange that supposed to detect
whether the control (select) has changed on a postback.

This is not all that useful.

It should be like the asp.net control, DropDownList, that initiates a
postback when the option, AutoPostBack is set to true...so you can either
have it postback when the user changes it immediately or not do anything
when the user changes it.

Seems like a very easy thing to do..if you are going to set the
OnServerChange or OnChange, it should know whether or not you want a
postback OR if you want client side JavaScript to handle it.

Any comments from the ASP.NET team......

I'm not on the ASP.NET team, but it seems to me that AutoPostBack is a
property that MS has provided to the appropriate Web Form Controls (like
(ListBox). The Html controls are provided to closely mirror the native
functionality of the standard HTML tags.

It seems to me that if you want AutoPostPack in a HtmlSelect-like
control, you should just use <asp:listbox> or <asp:dropdownlist>.

Or am I missing something?
 
G

Guest

It has something to do with speed/performance, compatibility with doing
other javascript events. and the ability to an entire web page in all html
controls....

Html controls don't have to be completely rendered like the listbox or the
dropdownlist...performance
 
K

Kevin Spencer

IN the HTML document that is rendered by the page, all of the ASP.Net
controls mentioned render the same type of HTML object in the page - a
select object. There are several different classes which you can work with.
These are just tools. If you want a certain functionality, you must pick the
tool that offers that functionality.

If you want more server-side functionality in a Control, you are necessarily
talking about a "heavier" control. Performance is certainly an issue. That
is why Microsoft provides several different "weights" of DropDown List
controls. Complaining that a Control doesn't work because it's the wrong
tool is pointless. In other words, you can't have it both ways. If you want
a Control to do more, you are talking about using a Control with more of a
footprint.

--
HTH,

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

nospam said:
It has something to do with speed/performance, compatibility with doing
other javascript events. and the ability to an entire web page in all html
controls....

Html controls don't have to be completely rendered like the listbox or the
dropdownlist...performance
 
G

Guest

Hey man, I don't need for you to tell me that the wrong tool is being used.

QUESTION #1
Why is it called the OnServerClick event in the first place?
OnServerClick should mean detect an event and goto the server to see what it
is....NOT hit SUBMIT, then detect if it's changed......see the
difference......

If anything, it currently should be called OnServerCHANGE....NOT
OnServerClick...

OnServerClick SHOULD be Event Detection(just like OnClick).....not detect
CHANGE after the SUBMIT button has happened.

It would be best to have BOTH.....OnServerChange and
OnServerClick....currently there is NO POSTBACK for HtmlSelect, and last
time I checked there are a lot of <SELECT> boxes that can immediately
trigger a postback or JavaScript event to do something that the user
wants...not already define what the event is going to do in the first place

Currently, you have to have the submit button to trigger this
OnServerClick....which doesn't correspond to the other Html Controls.

Say if someone wants a simple <select> control to postback immediatly to do
something other than see if it's changed....like change the data to a
table....should they have to press submit?

Performance and consistency and also more client side and server side
functionality within the same control is what is desired.....we want
performance all around.....Html whenever possible....Considering this is
ASP.NET 2.0...it needs to be possible.....

So what's the point in labeling the correct tool improperly in the first
place to be inconsistent with all the other controls?

These are just tools. If you want a certain functionality, you must pick the
tool that offers that functionality.

WRONG!!! That's like saying to the customer...."if we don't have what you
want, pick someone else".


*************************************
A LITTLE HISTORY ON MVP's...............
*************************************
MVP's have that type of attitude toward a lot of people here.....These same
MVP's used that same "PICK-THE-RIGHT-TOOL argument for 100% POSTBACK
Pageflow as opposed to CROSSPOST to another page as well whenever someone
tried to post to another page..........Well guess what?....Who is going to
be oh-so completely wrong on 100% POSTBACK with ASP.NET 2.0? (that's why
every single web site made by and MVP sucks and guru web site SUCKS..that's
why .NET development is SLOW-GOING (Mister Bill said that)
Sorry Mr. MVP, but someone has to stick back in your place.






Kevin Spencer said:
IN the HTML document that is rendered by the page, all of the ASP.Net
controls mentioned render the same type of HTML object in the page - a
select object. There are several different classes which you can work with.
These are just tools. If you want a certain functionality, you must pick the
tool that offers that functionality.

If you want more server-side functionality in a Control, you are necessarily
talking about a "heavier" control. Performance is certainly an issue. That
is why Microsoft provides several different "weights" of DropDown List
controls. Complaining that a Control doesn't work because it's the wrong
tool is pointless. In other words, you can't have it both ways. If you want
a Control to do more, you are talking about using a Control with more of a
footprint.

--
HTH,

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

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top